Skip to content

Commit

Permalink
CI: deploy to dev server
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Apr 22, 2024
1 parent 0e5e49b commit 905ea25
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,31 @@ jobs:
- run: yarn typecheck
- run: yarn lint
- run: yarn build

deploy_dev:
needs:
- build
if: github.ref == 'refs/heads/develop'
name: Deploy Dev
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v4

- name: Deploy
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{vars.DEPLOY_SSH_HOST}}
username: ${{vars.DEPLOY_SSH_USERNAME}}
key: ${{secrets.DEPLOY_SSH_KEY_DEV}}
port: 2222
script: |
echo -n 'Deployment started at: ' &&
date -u &&
cd ${{vars.DEPLOY_SSH_PATH}} &&
git fetch &&
git checkout -f origin/develop &&
docker-compose build &&
docker-compose up -d &&
echo -n 'Deployment completed at: ' &&
date -u

0 comments on commit 905ea25

Please sign in to comment.