Skip to content

Commit

Permalink
build: deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyAisen committed May 22, 2024
1 parent 011dc8e commit a275c8e
Showing 1 changed file with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- cron: "0 5 * * *"

jobs:
build-project:
build-and-deploy:
if: github.repository == 'Aisen60/vant-theme'
runs-on: ubuntu-latest
concurrency:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v4
Expand All @@ -49,23 +49,13 @@ jobs:
- name: Build project
run: npm run build

deploy-gh-page:
runs-on: ubuntu-latest
# 依赖 build-project job
needs: [build-project]
steps:
- name: Deploy gh page
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.TOKEN_GH_PAGES }}
publish_dir: ./dist

sync-to-server:
runs-on: ubuntu-latest
# 依赖 build-project job
needs: [build-project]
steps:

- name: Copy files to server
uses: appleboy/scp-action@master
with:
Expand Down

0 comments on commit a275c8e

Please sign in to comment.