From 7d487e87b58e06b156124b6d8335fb8724ba1830 Mon Sep 17 00:00:00 2001 From: Joep Meindertsma Date: Thu, 9 Feb 2023 22:14:00 +0100 Subject: [PATCH] remote_host --- .github/workflows/deploy_staging.yml | 1 + .github/workflows/deployment.yml | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy_staging.yml b/.github/workflows/deploy_staging.yml index 6cd531195..102b53065 100644 --- a/.github/workflows/deploy_staging.yml +++ b/.github/workflows/deploy_staging.yml @@ -10,4 +10,5 @@ jobs: uses: './.github/workflows/deployment.yml' with: environment: staging + remote_host: staging.atomicdata.dev secrets: inherit diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 3d33f45c7..649f49dbf 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -6,9 +6,10 @@ on: environment: required: true type: string - secrets: - REMOTE_HOST: + remote_host: required: true + type: string + secrets: REMOTE_USER: required: true SSH_PRIVATE_KEY: @@ -16,6 +17,7 @@ on: jobs: deploy: + environment: ${{ environment }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -36,13 +38,13 @@ jobs: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} ARGS: "-rltgoDzvO" SOURCE: "target/x86_64-unknown-linux-musl/release/atomic-server" - REMOTE_HOST: ${{ secrets.REMOTE_HOST }} + REMOTE_HOST: ${{ remote_host }} REMOTE_USER: ${{ secrets.REMOTE_USER }} TARGET: ~/ - name: executing remote ssh commands using ssh key uses: appleboy/ssh-action@master with: - host: ${{ secrets.REMOTE_HOST }} + host: ${{ remote_host }} username: ${{ secrets.REMOTE_USER }} key: ${{ secrets.SSH_PRIVATE_KEY }} script: |