diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 650e2a43..950e66cd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -175,20 +175,25 @@ jobs: needs: deploy runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v3 - name: Define release name run: | 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@v1.8.0 + uses: lycheeverse/lychee-action@v2.8.0 with: - args: --verbose --no-progress https://${{ env.RELEASE_NAME}}.apip.preprod-tilleuls.ovh + args: --verbose --no-progress --accept 200,403,429 https://${{ env.URL }}