Files
cioyu.github.io/.github/workflows/deploy.yml
Workflow config file is invalid. Please check your config file: yaml: line 36: mapping values are not allowed in this context
2026-03-03 18:51:13 +08:00

36 lines
747 B
YAML

# 此脚本借鉴了https://blog.csdn.net/m0_74916313/article/details/151333440
name: Vue自动部署到github pages
on:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: yarn
- run: yarn build
- uses: actions/upload-pages-artifact@@v3
with:
path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
-uses: actions/deploy-pages@v4
id: deployment