Skip to content

πŸ“ Chore(CI/CD): Switch yarn to pnpm #13

πŸ“ Chore(CI/CD): Switch yarn to pnpm

πŸ“ Chore(CI/CD): Switch yarn to pnpm #13

Workflow file for this run

name: Build, Deploy and Release
on:
push:
tags:
- "v*"
pull_request:
branches:
- main
jobs:
build-and-deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# ε¦‚ζžœδ½ ζ–‡ζ‘£ιœ€θ¦ Git ε­ζ¨‘ε—οΌŒε–ζΆˆζ³¨ι‡ŠδΈ‹δΈ€θ‘Œ
# submodules: true
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- name: Build Docs
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
pnpm install
pnpm docs:build
echo "do not need it" > docs/.vuepress/dist/.nojekyll
cd ..
- name: Deploy Docs
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
# Branch where docs deploy to
branch: gh-pages
folder: docs/.vuepress/dist
- name: Zip Build
if: github.event_name != 'pull_request'
run: zip -r docs.zip ./docs/.vuepress/dist
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref }}
body: Auto release by Actions.
draft: false
prerelease: false
files: |
docs.zip