-
Notifications
You must be signed in to change notification settings - Fork 11
82 lines (79 loc) · 2.09 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Build CGGMP21 Spec & Docs
on:
pull_request:
branches: [ "*" ]
push:
branches: [ "m" ]
env:
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: true
jobs:
build_pdf:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v3
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
working_directory: spec
- name: Rename PDF
run: mv spec/main.pdf spec/cggmp21-spec.pdf
- name: Upload artifacts
id: upload-pdf
uses: actions/upload-artifact@v4
with:
name: spec-pdf
path: spec/cggmp21-spec.pdf
- name: Leave PR comment
continue-on-error: true
uses: marocchino/sticky-pull-request-comment@v2
with:
header: spec_is_built
message: The spec was successfully compiled. PDF is available [here](${{ steps.upload-pdf.outputs.artifact-url }}).
build_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
- name: Build docs
run: make docs && cp docs/redirect.html target/doc/index.html
- name: Upload docs
uses: actions/upload-artifact@v4
with:
name: docs
path: target/doc
deploy_pages:
runs-on: ubuntu-latest
needs: [build_pdf, build_docs]
if: github.ref == 'refs/heads/m'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: docs
path: website
- uses: actions/download-artifact@v4
with:
name: spec-pdf
path: spec
- name: Move the spec
run: mv spec/cggmp21-spec.pdf website
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'website'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4