Skip to content

Commit

Permalink
add GH workflowµ
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-24 committed May 31, 2024
1 parent b9ee0a0 commit 55f0e11
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 55f0e11

Please sign in to comment.