Skip to content

πŸ“„ Docs: Updated. #12

πŸ“„ Docs: Updated.

πŸ“„ Docs: Updated. #12

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@v3
with:
fetch-depth: 0
# ε¦‚ζžœδ½ ζ–‡ζ‘£ιœ€θ¦ Git ε­ζ¨‘ε—οΌŒε–ζΆˆζ³¨ι‡ŠδΈ‹δΈ€θ‘Œ
# submodules: true
- name: Setup Yarn
# You may pin to the exact commit or the version.
# uses: DerYeger/yarn-setup-action@f55be5383ea94f5eb25b20aee609af4603a68dde
uses: DerYeger/[email protected]
with:
node-version: 18
- name: Build Docs
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
yarn install
yarn 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