Skip to content

Commit

Permalink
Merge pull request #3 from rezoleo/20220519
Browse files Browse the repository at this point in the history
Update RI & add CI
  • Loading branch information
DioFun authored May 10, 2024
2 parents 9cb173c + ecc305e commit d8993c5
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 54 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build-latex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: 'Build LaTex Document'

on:
push:
release:
types: [published]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
#Checks-out the repository
- name: Checkout
uses: actions/checkout@v3

#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
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
with:
name: PDF file
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
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"
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

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

[![Build Status](https://travis-ci.org/rezoleo/reglement_interieur.svg?branch=master)](https://travis-ci.org/rezoleo/reglement_interieur)
![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

Travis CI compile automatiquement à chaque push pour vérifier que le LaTeX est valide. Si jamais un commit est taggé (`git tag 2017-05-05` par exemple, puis `git push --tags`), Travis compile le PDF puis l'ajoute à la release (cf. ci-dessous).

## Historique

Ancien Etherpad de travail : https://rezopad.rez-gif.supelec.fr/p/RI_R%C3%A9zol%C3%A9o
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).
Loading

0 comments on commit d8993c5

Please sign in to comment.