-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (53 loc) · 1.57 KB
/
ci.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
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12.2'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Run pytest
run: pytest
build:
runs-on: ubuntu-latest
container: makeappdev/uselatex:latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git safe directory with GITHUB_WORKSPACE
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Build
run: |
cmake --version; pdflatex --version
mkdir -p build && cd build
cmake ..
make
- name: Prepare Deployment
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
run: |
mkdir -p export
echo "# This branch is for deployment only" >> export/README.md
cp build/*.pdf export
cp build/git.id export
- name: Deploy
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
branch: gh-pages
folder: export
single-commit: true
silent: true