Skip to content

Commit

Permalink
Create deploy.yml for tencent
Browse files Browse the repository at this point in the history
  • Loading branch information
wallyhung authored Jan 2, 2025
1 parent 3b0980c commit ca565ae
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy to tencent

on:
push:
branches:
- main # 或者你想要监控的分支名

jobs:
deploy:
runs-on: centos-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up SSH
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.CLOUD_DEPLOY_SSH }}

- name: Deploy to Tencent
run: |
ssh -o StrictHostKeyChecking=no app@81.69.45.49 "mkdir -p /home/app/hotel"
rsync -avz --delete --exclude '.git' --exclude '.github' ./ app@81.69.45.49:/home/app/hotel/

0 comments on commit ca565ae

Please sign in to comment.