Add github Actions deploy workflow
This commit is contained in:
parent
9d2f1e9508
commit
9f42452ba5
4 changed files with 530 additions and 460 deletions
19
.github/workflows/deploy.yml
vendored
Normal file
19
.github/workflows/deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
name: Deploy to Server
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy via SSH
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USERNAME }}
|
||||
key: ${{ secrets.SERVER_SSH_KEY }}
|
||||
script: |
|
||||
cd /home/prodesk/live-site || exit 1
|
||||
git checkout main
|
||||
git pull origin main
|
||||
echo "Deployed successfully"
|
||||
Loading…
Add table
Add a link
Reference in a new issue