Debian Codegraph @

.github/workflows/update-docs.yml

raw
1 name: Update docs
2 on:
3 push:
4 branches: [master]
5 permissions:
6 contents: write
7 jobs:
8 build-and-deploy:
9 concurrency: ci-${{ github.ref }}
10 runs-on: ubuntu-latest
11 steps:
12 - name: Checkout
13 uses: actions/checkout@v4
14 with:
15 fetch-depth: 1
16
17 - name: Download pandoc
18 uses: dsaltares/[email protected]
19 with:
20 repo: jgm/pandoc
21 version: tags/2.19.2
22 file: pandoc-2.19.2-1-amd64.deb
23 target: pandoc-2.19.2-1-amd64.deb
24
25 - name: Install and Build
26 run: |
27 sudo apt-get install -y libgl1-mesa-dev libglu-dev libxcursor-dev
28 sudo dpkg -i pandoc-2.19.2-1-amd64.deb
29 mkdir build
30 cd build
31 cmake ..
32 make html
33
34 - name: Checkout liballeg
35 uses: actions/checkout@v4
36 with:
37 repository: liballeg/liballeg.github.io
38 ssh-key: ${{ secrets.LIBALLEG_DEPLOY_KEY }}
39 ref: master
40 path: liballeg
41
42 - name: Deploy
43 run: |
44 cd liballeg
45 git config user.name "allebot"
46 git config user.email "[email protected]"
47 rm -R a5docs/trunk
48 cp -R ../build/docs/html/refman a5docs/trunk
49 git add a5docs/trunk
50 git diff-index --quiet HEAD || git commit -m "Automatic update from allegro5"
51 git push
52