From 6a2c609cf082c5d8ced6a1375afefd4db38bcb36 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Tue, 18 Apr 2023 08:17:54 +0200 Subject: [PATCH] force-push the built PDF to pages --- .github/workflows/pages.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..c605d23 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,31 @@ +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@v2 + - 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: | + git config --local user.name "$GITHUB_ACTOR" + git config --local 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