Skip to content

Commit

Permalink
feature: auto deploy on commit to main
Browse files Browse the repository at this point in the history
  • Loading branch information
marcellodotgg committed Sep 30, 2024
1 parent 6bf7f25 commit d3cb94b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy to DigitalOcean

on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-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.DO_SSH_KEY }}
- name: Deploy to DigitalOcean
run: |
ssh -o StrictHostKeyChecking=no ${{secrets.DO_USERNAME}}@${{secrets.DO_IP_ADDR}} 'cd fun-banking-api && ./deploy.sh'

0 comments on commit d3cb94b

Please sign in to comment.