Skip to content

action

action #1

Workflow file for this run

// workflows/pages.yml
name: Deploy Pages

Check failure on line 2 in .github/workflows/page.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/page.yml

Invalid workflow file

You have an error in your yaml syntax on line 2
on:
push:
branches:
- main # 这里只配置了master分支,所以只有推送master分支才会触发以下任务
jobs:
pages:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.15.0
uses: actions/setup-node@v2
with:
node-version: "16.x"
- name: Cache NPM dependencies
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache
restore-keys: |
${{ runner.OS }}-npm-cache
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.DEPLOY_TOKEN }}
publish_dir: ./dist