Compare commits
2 Commits
47d445fb8a
...
3565738919
Author | SHA1 | Date | |
---|---|---|---|
3565738919 | |||
16f3e17a3d |
29
.gitea/workflows/deploy.yml
Normal file
29
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: Deploy to Server
|
||||||
|
|
||||||
|
on:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup SSH Key
|
||||||
|
uses: webfactory/ssh-agent@v0.7.0
|
||||||
|
with:
|
||||||
|
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||||
|
|
||||||
|
- name: Add Known Host
|
||||||
|
run: ssh-keyscan ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
- name: Deploy to Server
|
||||||
|
run: |
|
||||||
|
ssh -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "
|
||||||
|
cd ${{ secrets.PROJECT_PATH }} &&
|
||||||
|
git pull origin master &&
|
||||||
|
docker-compose down --remove-orphans &&
|
||||||
|
docker-compose up -d --build
|
||||||
|
"
|
Loading…
x
Reference in New Issue
Block a user