Generate PDF #3
This file contains hidden or 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: Generate PDF | |
| on: | |
| # allows manual triggering of the workflow | |
| workflow_dispatch: | |
| # run on changes to main | |
| push: | |
| branches: | |
| - main | |
| # run on PRs to main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # grant GITHUB_TOKEN permissions for pages deployment | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build | |
| # wraps a LaTeX build environment | |
| uses: xu-cheng/latex-action@v4 | |
| with: | |
| root_file: M17_spec.tex | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Specification | |
| path: M17_spec.pdf | |
| - name: Deploy | |
| # only deploy on pushes to main, not on PRs | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: actions/deploy-pages@v4 |