This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
Bump vite from 2.9.15 to 2.9.16 in /docs (#21) #34
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: docs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'docs/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
NODE_VERSION: '18' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'yarn' | |
cache-dependency-path: yarn.lock | |
- name: Install dependencies | |
run: | | |
cd docs | |
yarn --frozen-lockfile | |
- name: Build site | |
run: | | |
cd docs | |
yarn build | |
- name: Upload Artefact | |
if: success() | |
uses: actions/upload-artifact@main | |
with: | |
name: dist | |
path: docs/.vitepress/dist | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/.vitepress/dist | |
publish_branch: gh_page | |
cname: gjzsr.com # if wanna deploy to custom domain | |