Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make GitHub Action work again #7

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 12 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Build Typst document
on: [push, workflow_dispatch]
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: write
Expand All @@ -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
2 changes: 1 addition & 1 deletion template/customization/great-theorems-customized.typ
Original file line number Diff line number Diff line change
@@ -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": *

Expand Down
Binary file modified template/main.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion template/main.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// global
#import "@preview/clean-math-thesis:0.2.0": template
#import "../lib.typ": template

//local
#import "customization/colors.typ": *
Expand Down