aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/gh-pages.yml
blob: ed7e0323a2b33b2cec74fa4d153946ca0342f5a9 (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
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: 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