mirror of
https://github.com/cioyu/cioyu.github.io.git
synced 2026-05-02 21:21:09 +08:00
咕咕嘎嘎
This commit is contained in:
36
.github/workflows/deploy.yml
vendored
Normal file
36
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# 此脚本借鉴了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
|
||||
Reference in New Issue
Block a user