feat: update rspress v1.12.0 (#5434) #855
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: Build Main Website | |
on: | |
push: | |
branches: [main] | |
paths: | |
- 'packages/document/main-doc/**' | |
- 'packages/document/builder-doc/**' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build-main-website: | |
runs-on: ${{ fromJSON(vars.SELF_LINUX_LABELS || '"ubuntu-latest"') }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Install Pnpm | |
run: corepack enable | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- name: Nx Cache | |
id: nx-cache | |
uses: actions/cache@v3 | |
with: | |
path: .nx/cache | |
key: nx-${{ github.ref_name }}-${{ github.sha }} | |
restore-keys: | | |
nx-${{ github.ref_name }}- | |
nx- | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Build Main Doc | |
run: cd packages/document/main-doc && npm run build && cd ../../../ | |
- name: Build Website | |
run: pnpm --filter @modern-js/main-doc run build:doc | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4.4.1 | |
with: | |
repository-name: web-infra-dev/web-infra-dev.github.io | |
branch: main | |
folder: packages/document/main-doc/doc_build | |
token: ${{ secrets.MODERN_DEPLOY_TOKEN }} | |
target-folder: modern-js | |
git-config-name: gh-pages-bot | |
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com | |
# enable single-commit to reduce the repo size | |
single-commit: true | |
clean: true | |
clean-exclude: | | |
v1/* | |
v1/**/* | |
builder/* | |
builder/**/* | |
doc-tools/* | |
doc-tools/**/* | |
module-tools/* | |
module-tools/**/* |