bachelor-thesis/.github/workflows/pages.yml
oleg.petruny 01b38a0e6e
All checks were successful
CI / Build thesis PDFs (push) Successful in 1m21s
CI / Build thesis PDFs and push them to pages (push) Successful in 1m12s
CI / Verify PDF/A (push) Successful in 1m5s
Fix workflows
2025-02-12 20:41:49 +01:00

36 lines
1.1 KiB
YAML

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:
- name: Install nodejs
run: apt-get update && apt-get install -y nodejs
- uses: https://gitea.com/ScMi1/checkout@v1
- 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 "$GITHUB_ACTOR@users.noreply.github.com"
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