mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 04:19:30 +08:00
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
# Simple workflow for deploying static content to GitHub Pages
|
|
name: Deploy static content to Pages
|
|
|
|
on:
|
|
# Runs on pushes targeting the default branch
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
# Allow one concurrent deployment
|
|
concurrency:
|
|
group: 'pages'
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# Single deploy job since we're just deploying
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# 执行依赖安装
|
|
- name: 安装依赖
|
|
run: |
|
|
npm i -g pnpm@7.27.0
|
|
pnpm i
|
|
pnpm build-gh
|
|
|
|
# 执行部署
|
|
- name: 部署
|
|
uses: JamesIves/github-pages-deploy-action@releases/v3 # 这个action会根据配置自动推送代码到指定分支
|
|
with:
|
|
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} # 指定密钥
|
|
BRANCH: gh-pages ##指定推送到的远程分支
|
|
FOLDER: dist # 指定构建之后要推送哪个目录的代码
|