Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/SantaClaas/usability-engineering.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869name: Compile Exercise 1
on: workflow_dispatch: push: branches: [main] paths: - "exercise-1/**" - ".github/workflows/compile-exercise-1.yml" # Compile pull requests to catch errors, but only deploy from main pull_request: paths: - "exercise-1/**" - ".github/workflows/compile-exercise-1.yml"
# Required for actions/deploy-pages@v4 to obtain an OIDC tokenpermissions: contents: read pages: write id-token: write
concurrency: group: "pages-${{ github.ref }}" cancel-in-progress: true
jobs: compile-paper: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v7
- name: Run compile run: docker run --rm --mount type=bind,src="$PWD",dst=/work --workdir /work ghcr.io/typst/typst:latest compile exercise-1/exercise-1.typ exercise-1.pdf
- name: Upload Artifact uses: actions/upload-artifact@v7 with: path: exercise-1.pdf
- name: Prepare Pages artifact folder run: | mkdir -p dist cp exercise-1.pdf dist/exercise-1.pdf # optional: make it easier to browse by adding a simple index page cat > dist/index.html <<'EOF' <!doctype html> <meta charset="utf-8" /> <title>Exercise 1</title> <a href="exercise-1.pdf" download="exercise-1.pdf">exercise-1.pdf</a> EOF
- name: Upload static files as artifact id: deployment uses: actions/upload-pages-artifact@v5 with: path: dist
deploy-pages: if: github.ref == 'refs/heads/main' environment: name: exercise-1 runs-on: ubuntu-latest needs: compile-paper steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v5