update weekly5 (#50) #122
This file contains hidden or 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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Update submodules | |
run: git submodule update --init --recursive | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install moonbit toolchain | |
run: | | |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: npm install | |
- name: Install kodama and typst | |
run: | | |
wget https://github.com/Lampese/kodama-streaming-release/releases/latest/download/kodama | |
chmod +x kodama | |
sudo mv kodama /usr/local/bin/ | |
wget https://github.com/typst/typst/releases/latest/download/typst-x86_64-unknown-linux-musl.tar.xz | |
tar -xf typst-x86_64-unknown-linux-musl.tar.xz | |
sudo mv typst-x86_64-unknown-linux-musl/typst /usr/local/bin/ | |
- name: Check moonbit code | |
run: | | |
cd code/moonbit | |
moon update | |
moon install | |
moon check | |
- name: Compile | |
run: node compile.js | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./trees/publish | |
deploy: | |
needs: build-and-deploy | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |