368 further condensation #1455
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: compilepaper | |
on: [push, pull_request] | |
jobs: | |
paper: | |
runs-on: ubuntu-24.04 | |
env: | |
DIR: . | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: false # must be done manually | |
- name: Install pandoc | |
run: | | |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \ | |
inkscape \ | |
texlive texlive-latex-extra pandoc latexmk \ | |
texlive-bibtex-extra biber \ | |
texlive-fonts-recommended texlive-fonts-extra lmodern fonts-linuxlibertine \ | |
python3 python3-yaml \ | |
xz-utils make sed gpg-agent | |
python3 -m venv ${{ env.DIR }}/venv && source ${{ env.DIR }}/venv/bin/activate | |
python3 -m pip install -r ${{ env.DIR }}/requirements.txt | |
# Workaround for https://github.com/tomduck/pandoc-xnos/pull/29 | |
python3 -m pip install --force-reinstall git+https://github.com/tomduck/pandoc-xnos@284474574f51888be75603e7d1df667a0890504d#egg=pandoc-xnos | |
- name: Fetch bibliography | |
run : | | |
# resolve relative paths in forked projects | |
sed -i 's|^[ \t]*url *= *../| url = https://github.com/the-teachingRSE-project/|' .gitmodules | |
git submodule update --init --recursive | |
git config --local submodule.recurse true | |
- name: pandoc compile | |
working-directory: ${{ env.DIR }} | |
run: source ${{ env.DIR }}/venv/bin/activate && make all | |
- name: move | |
run: mkdir -p github_artifacts && mv ${{ env.DIR }}/*.pdf ./github_artifacts/ | |
- name: Upload pdf as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PDF files | |
path: ./github_artifacts | |
deploy: | |
needs: [paper] | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
if: ${{ github.repository == 'the-teachingRSE-project/competencies' && github.ref == 'refs/heads/main' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: github_artifacts | |
- name: move | |
run: mkdir -p github_deploy && mv github_artifacts/*/* github_deploy | |
- name: deploy on orphan branch | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./github_deploy | |
publish_branch: build | |
force_orphan: true |