Skip to content

Readme

Readme #60

name: Build and Release
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
- push
- pull_request
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build all files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run tests
run: nix flake check -L
publish:
name: Publish
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
if: startsWith(github.ref, 'refs/tags/')
steps:
# only execute if a new release is created
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build .#documentation-artifacts
- uses: actions/checkout@v4
with:
repository: kai-tub/latex-beamer-pure-minimalistic.wiki.git
path: wiki
- run: |
echo "Copy documentation results to wiki"
install --mode=666 ./result wiki/
cd wiki
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "update wiki"
echo "annotate release if release triggered the workflow"
git tag --annotate --message "Release" ${{ github.ref_name }}
git push