Skip to content

Update deploy.yml

Update deploy.yml #30

Workflow file for this run

name: Github-CI
on:
push:
pull_request:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# 获取源码
- name: Checkout
uses: actions/checkout@v3
# 安装依赖并打包
- name: install and build
run: |
npm install
npm run build
# 自动部署到 pages 分支
- name: Deploy to pages
uses: peaceiris/actions-gh-pages@v3
with:
target_branch: pages
publish_branch: pages
build_dir: dist
publish_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_KEY }}