diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1a8d9b26..83be5837 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -184,13 +184,16 @@ jobs: set -o pipefail if [[ "${{ github.ref }}" == 'refs/heads/main' ]]; then echo "RELEASE_NAME=website-prod" >> "$GITHUB_ENV" + echo "URL=api-platform.com" >> "$GITHUB_ENV" else - CONTEXT=nonprod if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then echo RELEASE_NAME=pr-$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") >> "$GITHUB_ENV" + export RELEASE_NAME=pr-$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") else echo "RELEASE_NAME=${{ github.ref_name }}" >> "$GITHUB_ENV" + export RELEASE_NAME=${{ github.ref_name }} fi + echo "URL=$RELEASE_NAME.apip.preprod-tilleuls.ovh" >> "$GITHUB_ENV" fi - name: Check for dead links uses: lycheeverse/lychee-action@v2.8.0 @@ -201,4 +204,4 @@ jobs: # site. Keep it advisory (report, don't fail the deploy) until the # cluster serves a trusted certificate, then remove `fail: false`. fail: false - args: --verbose --no-progress --accept 200,403,429 https://${{ env.RELEASE_NAME}}.apip.preprod-tilleuls.ovh + args: --verbose --no-progress --accept 200,403,429 https://${{ env.URL }}