forked from typst/typst
-
Notifications
You must be signed in to change notification settings - Fork 13
31 lines (29 loc) · 952 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Based on ripgrep's release action:
# https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml
name: Deploy Documentation
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
name: build-and-deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# python3 and package jinja2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: python3 -m pip install jinja2 PyYAML
- run: cargo test --package typst-docs --lib -- tests::test_docs --exact --nocapture
- run: python3 ./gen.py
# deploy ./dist to https://github.com/typst-doc-cn/typst-doc-cn.github.io
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist # The folder the action should deploy.