Add Forgejo actions deployment workflow
This commit is contained in:
parent
647d12efbd
commit
e3c1748d6a
1 changed files with 22 additions and 0 deletions
22
.forgejo/workflows/deploy.yml
Normal file
22
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
name: Deploy via SSH
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest # Make sure you have a runner with this label
|
||||
steps:
|
||||
- name: Deploy to Server
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
port: 22 # or 8022 based on your previous scp command
|
||||
script: |
|
||||
cd ~/Git/tracker
|
||||
git pull origin main
|
||||
docker compose up -d --build
|
||||
Loading…
Add table
Add a link
Reference in a new issue