Skip to content

Commit

Permalink
test: ssh to server
Browse files Browse the repository at this point in the history
  • Loading branch information
aryyawijaya committed Jul 17, 2024
1 parent 837272d commit 0dc42d3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,22 @@ jobs:
steps:
- name: Checkout to get docker compose & env file
uses: actions/checkout@v4
- name: Copy docker compose & env file
uses: appleboy/[email protected]
with:
host: ${{ secrets.VM_HOST }}
username: ${{ secrets.VM_USERNAME }}
key: ${{ secrets.VM_KEY }}
source: 'docker-compose.yaml,.env'
target: /app
# - name: Copy docker compose & env file
# uses: appleboy/[email protected]
# with:
# host: ${{ secrets.VM_HOST }}
# username: ${{ secrets.VM_USERNAME }}
# key: ${{ secrets.VM_KEY }}
# source: 'docker-compose.yaml,.env'
# target: /app
- name: SSH to server to deploy container
uses: appleboy/[email protected]
with:
host: ${{ secrets.VM_HOST }}
username: ${{ secrets.VM_USERNAME }}
key: ${{ secrets.VM_KEY }}
script: |
ls -al .
cd /app
sed -i 's/^GO_IMAGE_TAG=.*/GO_IMAGE_TAG=${{ github.sha }}/' .env
docker compose --env-file .env up -d

0 comments on commit 0dc42d3

Please sign in to comment.