Skip to content

update

update #215

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
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- 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@v2
with:
name: vuepress-dist
path: ./.vuepress/dist
deploy:
if: github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
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