First attempt at GitHub Actions Gerby #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build pdf | |
on: | |
- push | |
- workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Run `make pdfs` | |
uses: xu-cheng/texlive-action/full@v1 | |
with: | |
run: | | |
apk add make | |
make pdfs | |
- name: Move output | |
run: mkdir github-artifacts && mv *.pdf ./github-artifacts | |
- name: Upload pdf's as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pdfs | |
path: ./github-artifacts | |
deploy: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
path: github-artifacts | |
- name: Move pdf | |
run: mkdir -p github-deploy && mv github-artifacts/*/* github-deploy | |
- name: Deploy on orphan branch | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./github-deploy | |
publish_branch: build | |
force_orphan: true |