diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 51f515db1..0688b2830 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -71,9 +71,6 @@ jobs: SSH_KEY: ${{ secrets.GCP_SSH_PRIVATE_KEY_STAGING }} SSH_HOST: ${{ secrets.GCP_SSH_HOST_STAGING }} - - name: Update environment variables - run: ssh staging 'export $(gcloud secrets versions access latest --secret="ubyssey_env_configs" | xargs)' - - name: Set tag in docker-compose.yml run: sed -i "s/\${TAG}/${{ github.ref_name }}/g" docker-compose.yml @@ -84,4 +81,7 @@ jobs: run: scp -r nginx staging:/opt/ubyssey.ca/nginx - name: Restart services - run: ssh staging 'docker compose -f /opt/ubyssey.ca/docker-compose.yml -p ubyssey up -d' + run: ssh staging ' + export $(gcloud secrets versions access latest --secret="ubyssey_env_configs" | xargs) + docker compose -f /opt/ubyssey.ca/docker-compose.yml -p ubyssey up -d + '