Skip to content

Commit 1cd8864

Browse files
committed
ci: better deploy script
1 parent 946843c commit 1cd8864

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/push-image.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,21 @@ jobs:
5959
labels: ${{ steps.meta.outputs.labels }}
6060

6161
deploy-to-dev:
62-
name: Deploy to dev server
62+
name: Deploy to dev
6363
runs-on: ubuntu-latest
6464
needs: push-image
65+
if: github.ref == 'refs/heads/main'
66+
environment:
67+
name: dev
68+
url: ${{ vars.APP_URL }}
69+
6570
steps:
6671
- name: Deploy via SSH
6772
uses: appleboy/[email protected]
6873
with:
6974
host: ${{ secrets.SSH_HOST }}
7075
username: ${{ secrets.SSH_USER }}
7176
key: ${{ secrets.SSH_PRIVATE_KEY }}
72-
# Dummy command
73-
script: whoami
77+
port: ${{ secrets.SSH_PORT || 22 }}
78+
fingerprint: ${{ secrets.SSH_HOST_FINGERPRINT }}
79+
script: deploy dev

0 commit comments

Comments
 (0)