aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/gh-pages.yml
blob: ab4f2771b1c2c89104442dd28e2474ba2a386e36 (plain)
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
name: docs

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Install emacs
      run: sudo apt-get install emacs

    - name: Generate documentation
      run: cd docs && emacs --batch --no-init --load publish.el --funcall org-publish-all

    - name: Generation Coq documentation
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: scripts/download_artifact.sh

    - name: Generate Admitted icon
      run: python3 scripts/statistics.py src && mkdir -p docs/html/assets && mv admitted.svg docs/html/assets/.

    - name: Deploy gh-pages
      uses: peaceiris/actions-gh-pages@v3
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: ./docs/html