build: bump version to 0.5.0-rc9 (#601) #668
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: reflexo::release::gh_pages | |
env: | |
SCCACHE_GHA_ENABLED: 'true' | |
RUSTC_WRAPPER: 'sccache' | |
CARGO_INCREMENTAL: '0' | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ['main'] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
pages: write | |
id-token: write | |
contents: read | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: false | |
jobs: | |
build-gh-pages: | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Mold | |
uses: rui314/setup-mold@v1 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install Rust for Wasm targets | |
run: rustup target add wasm32-unknown-unknown | |
- name: Set Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | bash | |
- name: Download & install shiroa | |
run: | | |
curl -L https://github.com/Myriad-Dreamin/shiroa/releases/download/v0.2.0-nightly4/shiroa-x86_64-unknown-linux-gnu.tar.gz | tar -xvz | |
chmod +x shiroa-x86_64-unknown-linux-gnu/bin/shiroa | |
sudo cp shiroa-x86_64-unknown-linux-gnu/bin/shiroa /usr/bin/shiroa | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Download font assets | |
run: | | |
mkdir -p assets/fonts | |
curl -L https://github.com/Myriad-Dreamin/shiroa/releases/download/v0.1.0/charter-font-assets.tar.gz | tar -xvz -C assets/fonts | |
- name: Build | |
run: | | |
cargo build --profile release-ci --bin typst-ts-cli | |
- name: Install packages | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install | |
- name: Build Typescript packages | |
run: | | |
yarn run build:pkg | |
- name: Prepare artifacts | |
run: | | |
shiroa build --font-path assets/fonts --path-to-root /typst.ts/cookery/ -w . -d ../../github-pages/cookery/ docs/cookery | |
cargo run --profile release-ci --bin typst-ts-cli -- compile --workspace . --entry ./github-pages/docs/readme.typ --input=x-target=pdf-ayu --format=pdf --format=vector | |
- name: Copy assets | |
run: | | |
mkdir -p github-pages/compiler/ | |
mkdir -p github-pages/renderer/ | |
cp packages/compiler/pkg/* github-pages/compiler/ | |
cp packages/renderer/pkg/* github-pages/renderer/ | |
cp packages/typst.ts/dist/esm/main.bundle.js github-pages/typst-main.js | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
# Upload `/github-pages` sub directory | |
path: './github-pages' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |