Skip to content

Commit

Permalink
CI update test
Browse files Browse the repository at this point in the history
  • Loading branch information
D0gmaDev committed Jul 16, 2024
1 parent 5bf1dad commit 2667ae7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 34 deletions.
46 changes: 15 additions & 31 deletions .github/workflows/build-latex.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Build LaTex Document'
name: Build LaTeX document

on:
push:
Expand All @@ -11,50 +11,34 @@ 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

- 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 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"
body: "Compiled LaTeX document"


8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Règlement intérieur
===================

![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
![Build status](https://github.com/rezoleo/reglement_interieur/actions/workflows/build-latex.yml/badge.svg)

Git de travail du règlement intérieur de Rézoléo.
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).
Le règlement intérieur est ratifé par les membres du bureau et entre alors en vigueur.

La dernière version en vigueur est accessible [ici](https://ri.rezoleo.fr/).

0 comments on commit 2667ae7

Please sign in to comment.