mirror of
https://github.com/danbulant/oxc
synced 2026-05-20 20:58:48 +00:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: Website
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 * * *" # 00:00 every day
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
website:
|
|
name: Deploy Website
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Rust Toolchain
|
|
uses: ./.github/actions/rustup
|
|
with:
|
|
save-cache: ${{ github.ref_name == 'main' }}
|
|
shared-key: 'wasm'
|
|
|
|
- name: Install pnpm
|
|
working-directory: website
|
|
run: corepack enable
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache-dependency-path: ./website/package.json
|
|
cache: pnpm
|
|
|
|
- name: Build
|
|
working-directory: website
|
|
run: |
|
|
pnpm install
|
|
pnpm run build
|
|
|
|
- name: Deploy Website
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: website/dist
|
|
publish_branch: gh-pages
|