From 0dc42d38a65af9c50602079b082a492195917680 Mon Sep 17 00:00:00 2001 From: aryya Date: Wed, 17 Jul 2024 13:13:41 +0700 Subject: [PATCH] test: ssh to server --- .github/workflows/main.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1913af6..30e67c7 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -30,14 +30,14 @@ jobs: steps: - name: Checkout to get docker compose & env file uses: actions/checkout@v4 - - name: Copy docker compose & env file - uses: appleboy/scp-action@v0.1.7 - 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/scp-action@v0.1.7 + # 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/ssh-action@v1.0.3 with: @@ -45,6 +45,7 @@ jobs: 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