-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Deploy Site To Server | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
main-branch-deploy: | ||
if: github.repository == 'Aisen60/vant-theme' | ||
runs-on: ubuntu-latest | ||
env: | ||
# 设置时区环境变量 | ||
TZ: Asia/Shanghai | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
steps: | ||
- name: Deploy | ||
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 main | ||
pnpm install | ||
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters