Skip to content

Merge remote-tracking branch 'origin/main' #2

Merge remote-tracking branch 'origin/main'

Merge remote-tracking branch 'origin/main' #2

Workflow file for this run

name: build website
on:
push:
branches:
- main
workflow_dispatch:
permissions: write-all
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '14'
- name: 缓存依赖
uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 安装依赖
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: 构建
run: yarn build
- name: 发布到Github Pages
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: ./dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}