From c315c34b0ffb4420a4dceb8478734f2dfe44d93a Mon Sep 17 00:00:00 2001 From: David Marembert <57146094+D0gmaDev@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:12:49 +0200 Subject: [PATCH] Update CI (#5) * See https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/ * Change latex compiler --- .github/workflows/build-latex.yml | 47 +++++++++++-------------------- README.md | 8 ++++-- 2 files changed, 21 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build-latex.yml b/.github/workflows/build-latex.yml index 7c7930f..b3f5c91 100644 --- a/.github/workflows/build-latex.yml +++ b/.github/workflows/build-latex.yml @@ -1,4 +1,4 @@ -name: 'Build LaTex Document' +name: Build LaTeX document on: push: @@ -11,50 +11,35 @@ permissions: jobs: build: runs-on: ubuntu-latest - steps: - #Checks-out the repository - - name: Checkout - uses: actions/checkout@v3 + - name: Set up Git repository + uses: actions/checkout@v4 - #Enable cache - - uses: actions/cache@v3 - name: Tectonic Cache - with: - path: ~/.cache/Tectonic - key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }} - restore-keys: | - ${{ runner.os }}-tectonic- - - # Setup tectonic - - name: Install Tectonic - uses: wtfjoke/setup-tectonic@e61d40cc462e10ce897e140d3ddc8fa76ac55a5f # v2 + - name: Compile LaTeX document + uses: xu-cheng/latex-action@v3 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - tectonic-version: 0.14.1 - - # Run tectonic to compile document - - name: Compile TeX file - run: tectonic ReglementInterieur.tex - - - - name: Upload artifact - uses: actions/upload-artifact@v3 + root_file: ReglementInterieur.tex + extra_fonts: ./fonts/*.ttf + latexmk_use_xelatex: true + + - name: Upload PDF file + uses: actions/upload-artifact@v4 with: - name: PDF file + name: Compiled LaTeX document path: "*.pdf" if-no-files-found: error retention-days: 5 # Upload pdf file in GitHub release - if: ${{ github.event_name == 'release'}} - name: Upload pdf to release + name: Upload PDF file to release uses: svenstaro/upload-release-action@2b9d2847a97b04d02ad5c3df2d3a27baa97ce689 # v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: "*.pdf" - asset_name: main.pdf tag: ${{ github.ref }} overwrite: true file_glob: true - body: "PDF compiled from source" \ No newline at end of file + body: "Compiled LaTeX document" + + diff --git a/README.md b/README.md index 678d3b0..0e6b87c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ Règlement intérieur =================== -![Build status](https://github.com/rezoleo/reglement-interieur/actions/workflows/build-latex.yml/badge.svg) +![Build status](https://github.com/rezoleo/reglement_interieur/actions/workflows/build-latex.yml/badge.svg) -Git de travail pour le règlement intérieur du Rézoléo +Git de travail du règlement intérieur de Rézoléo. +Le règlement intérieur est compilé par Github Actions. Si une release est créée, alors le PDF est ajouté à la release. Sinon, il est simplement ajouté aux artifacts. +Le règlement intérieur est ratifé par les membres du bureau et entre alors en vigueur. -Le règlement intérieur est compilé par la Github Action `build-latex`. Si une release est créée, alors le PDF est ajouté à la realease. Sinon, il est simplement compilé (et ajouté aux artifacts). +La dernière version en vigueur est accessible [ici](https://ri.rezoleo.fr/).