Files
fuwari/.github/workflows/deploy.yml
二叉树树 376ebbae5a ci(workflow): 添加部署工作流的写入权限
添加 contents: write 权限以允许工作流推送更改
2025-11-24 18:58:29 +08:00

27 lines
576 B
YAML

name: Build and Deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy to page branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_branch: page
cname: ${{ secrets.CNAME }}