From 72b49564cab03858b5465c579fd026ef2703eb90 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Mon, 20 Dec 2021 18:48:31 +0000 Subject: [PATCH] Specify ssh details in env secrets --- .github/workflows/deploy.yml | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 70beafeb..864269c5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,8 +26,9 @@ jobs: - name: 🔄 Clone Repository uses: appleboy/ssh-action@master with: - host: ${{ env.host }} - username: ${{ env.username }} + host: ${{ secrets.DEPLOYMENT_HOST }} + port: ${{ secrets.DEPLOYMENT_PORT }} + username: ${{ secrets.DEPLOYMENT_USER }} key: ${{ secrets.DEPLOYMENT_KEY }} script: | [ -d ${{ env.releasesDir }} ] || mkdir ${{ env.releasesDir }} @@ -48,8 +49,9 @@ jobs: - name: 🎵 Run Composer uses: appleboy/ssh-action@master with: - host: ${{ env.host }} - username: ${{ env.username }} + host: ${{ secrets.DEPLOYMENT_HOST }} + port: ${{ secrets.DEPLOYMENT_PORT }} + username: ${{ secrets.DEPLOYMENT_USER }} key: ${{ secrets.DEPLOYMENT_KEY }} script: | cd ${{ env.newReleaseDir }} @@ -58,8 +60,9 @@ jobs: - name: 🔗 Update Symlinks uses: appleboy/ssh-action@master with: - host: ${{ env.host }} - username: ${{ env.username }} + host: ${{ secrets.DEPLOYMENT_HOST }} + port: ${{ secrets.DEPLOYMENT_PORT }} + username: ${{ secrets.DEPLOYMENT_USER }} key: ${{ secrets.DEPLOYMENT_KEY }} script: | # Import the environment config @@ -69,8 +72,9 @@ jobs: - name: ✨ Optimize Installation uses: appleboy/ssh-action@master with: - host: ${{ env.host }} - username: ${{ env.username }} + host: ${{ secrets.DEPLOYMENT_HOST }} + port: ${{ secrets.DEPLOYMENT_PORT }} + username: ${{ secrets.DEPLOYMENT_USER }} key: ${{ secrets.DEPLOYMENT_KEY }} script: | cd ${{ env.newReleaseDir }}; @@ -79,8 +83,9 @@ jobs: - name: 🙈 Migrate database uses: appleboy/ssh-action@master with: - host: ${{ env.host }} - username: ${{ env.username }} + host: ${{ secrets.DEPLOYMENT_HOST }} + port: ${{ secrets.DEPLOYMENT_PORT }} + username: ${{ secrets.DEPLOYMENT_USER }} key: ${{ secrets.DEPLOYMENT_KEY }} script: | cd ${{ env.newReleaseDir }} @@ -89,8 +94,9 @@ jobs: - name: 🙏 Bless release uses: appleboy/ssh-action@master with: - host: ${{ env.host }} - username: ${{ env.username }} + host: ${{ secrets.DEPLOYMENT_HOST }} + port: ${{ secrets.DEPLOYMENT_PORT }} + username: ${{ secrets.DEPLOYMENT_USER }} key: ${{ secrets.DEPLOYMENT_KEY }} script: | ln -nfs ${{ env.newReleaseDir }} ${{ env.currentDir }}; @@ -107,8 +113,9 @@ jobs: - name: 🚾 Clean up old releases uses: appleboy/ssh-action@master with: - host: ${{ env.host }} - username: ${{ env.username }} + host: ${{ secrets.DEPLOYMENT_HOST }} + port: ${{ secrets.DEPLOYMENT_PORT }} + username: ${{ secrets.DEPLOYMENT_USER }} key: ${{ secrets.DEPLOYMENT_KEY }} script: | cd ${{ env.releasesDir }}