-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 1.59 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build and Publish LaTeX documents
on: [push, pull_request, workflow_dispatch]
jobs:
build_latex:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: true
matrix:
include:
- source: "2024_UD2_Chromacase.tex"
name: "User Documentation"
- source: "2024_TD2_Chromacase.tex"
name: "Technical Documentation"
name: "Build ${{ matrix.name }}"
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: ${{ matrix.source }}
latexmk_use_xelatex: true
latexmk_shell_escape: true
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: 2024_DA2_Chromacase
path: |
./2024*.pdf
publish:
runs-on: ubuntu-latest
needs: build_latex
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v3
with:
name: 2024_DA2_Chromacase
- name: Clone SVN
run: svn co "${{ secrets.SVN_URL }}" svn --username '${{ secrets.SVN_UNAME }}' --password '${{ secrets.SVN_PWD }}'
- name: Move Generated files
run: mv *.pdf svn/rendu
- name: Commit files
run: |
cd svn/rendu
svn add --force .;
svn commit -m 'DA2: ${{ github.event.head_commit.message }}' --username '${{ secrets.SVN_UNAME }}' --password '${{ secrets.SVN_PWD }}'