Update README file #14
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: 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: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup caching for tectonic | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/Tectonic | |
key: tectonic-${{ runner.os }} | |
- name: Setup caching for conda packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/conda_pkgs_dir | |
key: conda-${{ runner.os }}-${{ hashFiles('environment.yml') }} | |
- name: Setup Miniconda | |
uses: conda-incubator/setup-miniconda@v2.1.1 | |
with: | |
environment-file: environment.yml | |
activate-environment: cv | |
miniforge-variant: Mambaforge | |
miniforge-version: "latest" | |
use-mamba: true | |
channel-priority: strict | |
# Needed for caching | |
use-only-tar-bz2: true | |
- name: List installed packages | |
run: mamba list | |
- name: Build CV | |
run: | | |
make all | |
touch _output/.nojekyll | |
- name: Deploy | |
if: success() && github.event_name == 'push' | |
# Don't use tags: https://julienrenaux.fr/2019/12/20/github-actions-security-risk/ | |
uses: JamesIves/github-pages-deploy-action@049a95c516cd5723d8cfde79dc7a79fcdcbd6c97 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: _output |