Bump actions/cache from 4 to 5 #98
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: compile-pdf | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| # Use bash by default in all jobs | |
| defaults: | |
| run: | |
| # The -l {0} is necessary for conda environments to be activated | |
| # But this breaks on MacOS if using actions/setup-python: | |
| # https://github.com/actions/setup-python/issues/132 | |
| shell: bash -l {0} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup caching for tectonic | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/Tectonic | |
| key: tectonic-${{ runner.os }} | |
| - name: Setup Miniconda | |
| uses: conda-incubator/[email protected] | |
| with: | |
| environment-file: environment.yml | |
| activate-environment: cv | |
| miniforge-version: "latest" | |
| use-mamba: true | |
| - name: List installed packages | |
| run: mamba list | |
| - name: Compile the PDF | |
| run: | | |
| make | |
| mkdir output | |
| cp *.pdf output/ | |
| - name: Push to gh-pages | |
| if: success() && github.event_name == 'push' | |
| # Don't use tags: https://julienrenaux.fr/2019/12/20/github-actions-security-risk/ | |
| uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./output | |
| publish_branch: pdf | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' |