From 55f0e1186419e1635aad86f562d3f4f68279c77c Mon Sep 17 00:00:00 2001 From: Pierre Beaujean Date: Fri, 31 May 2024 14:21:16 +0200 Subject: [PATCH] =?UTF-8?q?add=20GH=20workflow=C2=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yml | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..0ceb10a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,57 @@ +name: Publish latest PDFs + +on: + push: + branches: [ master ] + +permissions: + contents: write + +jobs: + build: + name: Publish + runs-on: ubuntu-latest + strategy: + fail-fast: false + env: + REF: 'latest' + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' + - name: Install LaTeX + run: | + sudo apt-get -y install texlive texlive-latex-extra + - name: change ref (tag) + if: contains(github.ref, 'tags') + run: | + echo "REF=${{ github.ref_name }}" >> "$GITHUB_ENV" + - name: Generate images + run: | + cd analyses + pip install -r requirements.txt + make + - name: build PDFs + run: | + lualatex nitroxides.tex + lualatex nitroxides_SI.tex + - name: Upload main text + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: nitroxides.pdf + asset_name: Main_Text.pdf + tag: ${{ env.REF }} + overwrite: true + - name: Upload main text + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: nitroxides_SI.pdf + asset_name: Supporting_Info.pdf + tag: ${{ env.REF }} + overwrite: true +