-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (61 loc) · 1.79 KB
/
build_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
name: Build doc
on:
push:
jobs:
build:
name: Build docs
runs-on: ubuntu-latest
container:
image: coqorg/coq:8.19
# This is a workaround a "bug" on the checkout action,
# see https://github.com/actions/checkout/issues/956
options: --user root
steps:
- uses: actions/checkout@master
- name: "Run coq-community/docker-coq-action@v1 with debian:10"
uses: coq-community/docker-coq-action@v1
with:
# Explanation for the permission issue:
# https://github.com/coq-community/docker-coq-action#permissions
before_script: |
startGroup "Workaround permission issue"
sudo chown -R coq:coq . # <--
endGroup
script: |
startGroup "Build project"
opam update -y
./install.sh -y
make
make doc
endGroup
uninstall: |
startGroup "Clean project"
make clean
endGroup
- name: Upload docs
uses: actions/upload-artifact@master
with:
name: docs-artifact
path: docs
- name: Revert permissions
# to avoid a warning at cleanup time
if: ${{ always() }}
run: sudo chown -R 1001:116 . # <--
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: docs-artifact
path: docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.8.0
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: docs
allow_empty_commit: true
force_orphan: true
enable_jekyll: true