Skip to content

Commit

Permalink
Merge pull request #7 from sebaseb98/gh-action
Browse files Browse the repository at this point in the history
Make GitHub Action work again
  • Loading branch information
sebaseb98 authored Nov 20, 2024
2 parents 4187d60 + 5a9cf6b commit f6eb3a7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 29 deletions.
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

0 comments on commit f6eb3a7

Please sign in to comment.