-
Notifications
You must be signed in to change notification settings - Fork 15
33 lines (30 loc) · 1 KB
/
pages.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
name: CI
on:
push:
branches: [ master ]
jobs:
build:
name: Build thesis PDFs and push them to pages
runs-on: ubuntu-latest
container: { image: 'aergus/latex' }
steps:
- uses: actions/checkout@v3
- name: Build the thesis
run: latexmk thesis && latexmk abstract-cz && latexmk abstract-en
- name: Prepare a website directory
run: |
mkdir -p public
cp -v thesis.pdf public
cp -v abstract-*.pdf public
- name: Upload to gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd public
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
GIT_WORK_TREE=. git checkout --orphan gh-pages
GIT_WORK_TREE=. git add .
GIT_WORK_TREE=. git commit -m 'pages'
git push --force --set-upstream origin gh-pages