-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (81 loc) · 2.39 KB
/
website.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
83
84
name: Build website from firedrakeproject/firedrake
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
jobs:
build_website:
name: Run doc build
# The type of runner that the job will run on
runs-on: ubuntu-latest
# The docker container to use.
container:
image: firedrakeproject/firedrake-docdeps:latest
options: --user root
volumes:
- ${{ github.workspace }}:/home/firedrake/output
# Steps represent a sequence of tasks that will be executed as
# part of the jobs
steps:
- uses: actions/checkout@v3
with:
repository: firedrakeproject/firedrake
- name: Install
run: |
. /home/firedrake/firedrake/bin/activate
python -m pip install -e .
- name: Check bibtex
run: |
. /home/firedrake/firedrake/bin/activate
cd docs
make validate-bibtex
- name: Check documentation links
if: ${{ github.ref == 'refs/heads/main' }}
run: |
. /home/firedrake/firedrake/bin/activate
cd docs
make linkcheck
- name: Build docs
run: |
. /home/firedrake/firedrake/bin/activate
cd docs
make html
make latex
make latexpdf
- name: Copy manual to HTML tree
run: |
cd docs
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
name: github-pages
path: /__w/firedrakeproject.github.io/firedrakeproject.github.io/docs/build/html
retention-days: 1
- name: Fix repo permissions
run: |
git config --global --add safe.directory /__w/firedrakeproject.github.io/firedrakeproject.github.io
- name: Checkout for keep alive
uses: actions/checkout@v3
- name: Keep alive commit
uses: gautamkrishnar/keepalive-workflow@v1
with:
time_elapsed: 30
deploy:
name: Deploy Github pages
needs: build_website
if: ${{ github.ref == 'refs/heads/main' }}
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: https://firedrakeproject.github.io
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2