Skip to content

管理人员变更 #282

管理人员变更

管理人员变更 #282

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run docs:build
- name: Compression
id: brotli
uses: b11p/compress-action@patch-1
with:
target-directory: ".vuepress/dist"
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: vuepress-dist
path: ./.vuepress/dist
deploy:
if: github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: vuepress-dist
path: ./.vuepress/dist
- name: Push to deploy branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.vuepress/dist