Skip to content

Commit

Permalink
test: scp-action
Browse files Browse the repository at this point in the history
  • Loading branch information
aryyawijaya committed Jul 17, 2024
1 parent 0dc42d3 commit 328c131
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,21 @@ 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 328c131

Please sign in to comment.