Skip to content

Commit

Permalink
build: deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
aisen60 committed May 22, 2024
1 parent fa40c8a commit 29572e2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,3 @@ jobs:
with:
github_token: ${{ secrets.TOKEN_GH_PAGES }}
publish_dir: ./dist

- name: Copy files to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SECRETS_HOST }}
port: ${{ secrets.SECRETS_PORT }}
username: ${{ secrets.SECRETS_USERNAME }}
password: ${{ secrets.SECRETS_PASSWORD }}
source: "dist/*"
target: "/opt/cxs/vant-theme"
28 changes: 28 additions & 0 deletions .github/workflows/sync-serve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy Server

on:
workflow_dispatch:
push:
branches: [gh-pages]

jobs:
deploy-server:
if: github.repository == 'Aisen60/vant-theme'
runs-on: ubuntu-latest
env:
# 设置时区环境变量
TZ: Asia/Shanghai
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Sync
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SECRETS_HOST }}
port: ${{ secrets.SECRETS_PORT }}
username: ${{ secrets.SECRETS_USERNAME }}
password: ${{ secrets.SECRETS_PASSWORD }}
script: |
cd /opt/cxs/vant-theme
git checkout .
git pull origin gh-pages

0 comments on commit 29572e2

Please sign in to comment.