Skip to content
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
58 changes: 43 additions & 15 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
Expand All @@ -20,25 +17,56 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Prepare Site
uses: actions/checkout@v6

- name: Cache Emscripten
id: cache-emsdk
uses: actions/cache@v4
with:
path: ~/emsdk
key: emsdk-${{ runner.os }}-latest

- name: Install Emscripten
if: steps.cache-emsdk.outputs.cache-hit != 'true'
run: |
git clone https://github.com/emscripten-core/emsdk.git ~/emsdk
~/emsdk/emsdk install latest
~/emsdk/emsdk activate latest

- name: Build WASM
run: |
brew upgrade -f python
brew install emscripten
source ~/emsdk/emsdk_env.sh
make wasm

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'pnpm'
cache-dependency-path: doc/pnpm-lock.yaml

- name: Install and build docs
run: |
cd doc
yarn
yarn build
cd ..
pnpm install
pnpm run build

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
with:
path: 'doc/docs/.vitepress/dist'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
1 change: 0 additions & 1 deletion doc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ dist
.basement
config.local.js
basement_dist
yarn.lock
docs/.vitepress/public/js/yuescript.js
docs/.vitepress/public/js/yuescript.wasm
6 changes: 3 additions & 3 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
## Development

```bash
yarn dev
yarn build
yarn preview
pnpm run dev
pnpm run build
pnpm run preview
```

For more details, please head to VitePress's [documentation](https://vitepress.dev/).
Loading
Loading