Skip to content

Build and publish to gh-pages #38

Build and publish to gh-pages

Build and publish to gh-pages #38

name: Build and publish to gh-pages
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '1 2 5 * *'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install TeX Live
uses: zauguin/install-texlive@v3
with:
package_file: tl_packages
- run: pdflatex l2kurz
- run: bibtex l2kurz
- run: pdflatex l2kurz
- run: pdflatex l2kurz
- name: Gather build artifacts
run: mkdir build && cp -r README.md l2kurz.pdf .github/_config.yml build/
- name: Upload build artifats
uses: actions/upload-artifact@v4
with:
name: build
path: build
- name: Upload to gh-pages branch
if: >
(github.repository == 'dante-ev/l2kurz') &&
(github.ref == 'refs/heads/main')
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Keep alive
if: ${{ always() }}
uses: gautamkrishnar/keepalive-workflow@v2