Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-gimenez committed Feb 29, 2024
1 parent 92e03eb commit a81d64a
Showing 1 changed file with 33 additions and 25 deletions.
58 changes: 33 additions & 25 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,45 @@
name: Build Typst document (CI)
on: [push, workflow_dispatch]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Typst
uses: lvignoli/typst-action@main
uses: actions/checkout@v4

- uses: typst-community/setup-typst@v3
with:
source_file: |
examples/exam-001.typ
examples/exam-002.typ
examples/exam-minimal.typ
version: latest

# - name: Upload PDF file
# uses: actions/upload-artifact@v3
# with:
# name: PDF
# path: *.pdf
- name: Delete samples
run: |
rm -rf ./examples/*.pdf
# - name: Get current date
# id: date
# run: echo "DATE=$(date +%Y-%m-%d-%H:%M)" >> $GITHUB_ENV
- name: Compile Typst to PDF
uses: mkpoli/compile-typst-action@main
with:
source_paths: "examples/exam-001.typ examples/exam-002.typ examples/exam-003.typ examples/exam-005.typ"
root_path: '.'

# - name: Release
# uses: softprops/action-gh-release@v1
# if: github.ref_type == 'tag'
# with:
# name: "${{ github.ref_name }} — ${{ env.DATE }}"
# files: main.pdf
- name: Compile Typst to PDF
uses: mkpoli/compile-typst-action@main
with:
source_paths: "examples/exam-localization.typ examples/exam-minimal.typ"
root_path: '.'

# - name: Check existence of output file
# run: |
# test -e "examples/exam-001.pdf"
# test -e "examples/exam-002.pdf"
# test -e "examples/exam-003.pdf"
# test -e "examples/exam-004.pdf"
# test -e "examples/exam-localization.pdf"
# test -e "examples/exam-minimal.pdf"

- name: Upload PDF file
uses: actions/upload-artifact@v3
with:
name: examples-g-exam
path: ./examples/*.pdf

0 comments on commit a81d64a

Please sign in to comment.