From 7edf38696581672a66119f91922a70c5d204b5c7 Mon Sep 17 00:00:00 2001 From: Jesse Bickel Date: Thu, 9 Jan 2025 16:33:43 -0600 Subject: [PATCH] Clean up deploy script Set the environment more simply and correctly, pass secrets through the `env` as documented, explicitly mark the URL in `curl` call. Issue #1410 --- .github/workflows/deploy.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 225a5656..4849cc5b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,12 +8,14 @@ on: jobs: deploy-to-test-env: runs-on: ubuntu-latest - environment: - name: test + environment: Test name: deploy-to-test steps: - uses: kachick/wait-other-jobs@v3.6.0 timeout-minutes: 24 + env: + TOKEN: ${{ secrets.DIGITAL_OCEAN_TOKEN }} + APP_ID: ${{ secrets.DIGITAL_OCEAN_APP_ID }} with: wait-list: | [ @@ -31,4 +33,4 @@ jobs: } ] - run: | - curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer ${{ secrets.DIGITAL_OCEAN_TOKEN }}" "https://api.digitalocean.com/v2/apps/${{ secrets.DIGITAL_OCEAN_APP_ID }}/deployments" -d '{ "force_build": true }' | jq -e .deployment.id + curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" --url "https://api.digitalocean.com/v2/apps/$APP_ID/deployments" -d '{ "force_build": true }' | jq -e .deployment.id