name: Update docs on: push: branches: [master] permissions: contents: write jobs: build-and-deploy: concurrency: ci-${{ github.ref }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 1 - name: Download pandoc uses: dsaltares/fetch-gh-release-asset@1.1.0 with: repo: jgm/pandoc version: tags/2.19.2 file: pandoc-2.19.2-1-amd64.deb target: pandoc-2.19.2-1-amd64.deb - name: Install and Build run: | sudo apt-get install -y libgl1-mesa-dev libglu-dev libxcursor-dev sudo dpkg -i pandoc-2.19.2-1-amd64.deb mkdir build cd build cmake .. make html - name: Checkout liballeg uses: actions/checkout@v4 with: repository: liballeg/liballeg.github.io ssh-key: ${{ secrets.LIBALLEG_DEPLOY_KEY }} ref: master path: liballeg - name: Deploy run: | cd liballeg git config user.name "allebot" git config user.email "13711631+allebot@users.noreply.github.com" rm -R a5docs/trunk cp -R ../build/docs/html/refman a5docs/trunk git add a5docs/trunk git diff-index --quiet HEAD || git commit -m "Automatic update from allegro5" git push