diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbac90e..3092652 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,10 @@ name: Build Typst document -on: [push, workflow_dispatch] +on: + push: + branches: + - main + pull_request: + workflow_dispatch: permissions: contents: write @@ -8,30 +13,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Typst - uses: lvignoli/typst-action@main - with: - source_file: template/main.typ - - - name: Upload PDF file - uses: actions/upload-artifact@v4 - with: - name: PDFs - path: template/main.pdf - - - name: Get current date - id: date - run: echo "DATE=$(date +%Y-%m-%d-%H:%M)" >> $GITHUB_ENV - - - name: Debug DATE - run: echo "DATE is ${{ env.DATE }}" - - - name: Release - uses: softprops/action-gh-release@v2 - if: github.ref_type == 'tag' + - uses: actions/checkout@v4 + - uses: typst-community/setup-typst@v3 + - run: typst compile --root . template/main.typ main.pdf + - uses: actions/upload-artifact@v4 with: - name: "${{ github.ref_name }} — ${{ env.DATE }}" - files: main.pdf + name: PDF + path: main.pdf diff --git a/template/customization/great-theorems-customized.typ b/template/customization/great-theorems-customized.typ index 11bedf2..a6a4d0d 100644 --- a/template/customization/great-theorems-customized.typ +++ b/template/customization/great-theorems-customized.typ @@ -1,5 +1,5 @@ // packages -#import "@preview/clean-math-thesis:0.2.0": mathcounter +#import "../../lib.typ": mathcounter #import "@preview/great-theorems:0.1.1": * #import "@preview/headcount:0.1.0": * diff --git a/template/main.pdf b/template/main.pdf index 8133c57..b5837c2 100644 Binary files a/template/main.pdf and b/template/main.pdf differ diff --git a/template/main.typ b/template/main.typ index 81d61b9..b7d532e 100644 --- a/template/main.typ +++ b/template/main.typ @@ -1,5 +1,5 @@ // global -#import "@preview/clean-math-thesis:0.2.0": template +#import "../lib.typ": template //local #import "customization/colors.typ": *