-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (65 loc) · 1.92 KB
/
Copy pathwebsite.yml
File metadata and controls
74 lines (65 loc) · 1.92 KB
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
name: Build and push website
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
concurrency:
# Cancels jobs running if new commits are pushed
group: >
${{ github.workflow }}-
${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_website:
name: Run doc build
runs-on: ubuntu-latest
container:
image: firedrakeproject/firedrake-vanilla-default:dev-release
steps:
# Pull the latest changes from the release branch, as we may have just changed to it
- name: Update Firedrake
run: |
cd /opt/firedrake
git pull
- name: Install documentation dependencies
run: |
python3 -m pip install -r /opt/firedrake/requirements-build.txt
python3 -m pip install --no-build-isolation '/opt/firedrake[docs]'
- name: Install system dependencies
run: |
apt-get update
apt-get -y install inkscape texlive-full pandoc
- name: Build documentation
working-directory: /opt/firedrake/docs
run: |
make SPHINXOPTS="-t release" html
make latex
make latexpdf
- name: Copy manual to HTML tree
working-directory: /opt/firedrake/docs
run: |
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: /opt/firedrake/docs/build/html
retention-days: 1
deploy:
name: Deploy Github pages
needs: build_website
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: https://firedrakeproject.github.io
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4