bachelor-thesis/.github/workflows/pages.yml

36 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2023-04-18 06:17:54 +00:00
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:
2025-02-11 21:30:38 +00:00
- name: Install nodejs
run: apt-get update && apt-get install -y nodejs
- uses: https://gitea.com/ScMi1/checkout@v1
2023-04-18 06:17:54 +00:00
- 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: |
2023-04-18 06:40:51 +00:00
cd public
2023-07-04 07:13:58 +00:00
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
2023-04-18 06:17:54 +00:00
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