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 75f7a4d
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Publish latest PDFs

on:
push:
branches: [ master ]
tags: [ 'v*' ]

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-full
- 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 75f7a4d

Please sign in to comment.