Skip to content

Commit

Permalink
feat: action deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Howardzhangdqs committed Jan 23, 2025
1 parent e53e5b6 commit ea37632
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/auto-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: auto deploy 🚀

on:
push:
branches:
- master
pull_request:

permissions:
contents: write
pages: write


jobs:
build-and-deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: setup-node
uses: actions/setup-node@v3
with:
node-version: '20.x'

# 安装 pnpm
- name: Install pnpm
run: npm install pnpm -g

# 安装依赖
- name: Install dependencies
run: pnpm i

# 打包
- name: Build application 🔧
run: pnpm run build

# 部署 https://github.com/JamesIves/github-pages-deploy-action
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
if: github.ref == 'refs/heads/master'
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: dist
clean: true

0 comments on commit ea37632

Please sign in to comment.