fix: manual sleep 3m to wait on deploy [sc-00] #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Vercel Preview URL Broken Link Checker | |
on: push | |
jobs: | |
check_broken_links: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- name: vercel-preview-url | |
uses: zentered/[email protected] | |
id: vercel_preview_url | |
env: | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
with: | |
vercel_project_id: 'QmSNiK5bcLmLnTeioXKfdE5uxVZ4Kh3nE7u6QLFKEfebM6' | |
vercel_team_id: 'team_AXvrWtvu32E0pksIZqnGmc78' | |
- name: DEBUG - Get URL | |
run: echo "https://${{ steps.vercel_preview_url.outputs.preview_url }}" | |
- name: Wait for Vercel Build | |
run: | | |
if [ "${{ steps.vercel_preview_url.outputs.deployment_state }}" != "READY" ]; then | |
sleep 180 | |
fi | |
# - uses: UnlyEd/github-action-await-vercel@v1 | |
# id: await-vercel | |
# env: | |
# VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
# with: | |
# deployment-url: "https://${{ steps.vercel_preview_url.outputs.preview_url }}" | |
# timeout: 400 # Wait for 10 seconds before failing | |
# poll-interval: 20 # Wait for 1 second before each retry | |
- name: Check for broken links | |
id: link-report | |
uses: celinekurpershoek/[email protected] | |
with: | |
url: "https://${{ steps.vercel_preview_url.outputs.preview_url }}/docs" | |
recursiveLinks: true | |
- name: DEBUG - Get the result | |
run: echo "${{steps.link-report.outputs.result}}" | |
- name: Add comment to PR | |
id: comment_to_pr | |
uses: marocchino/sticky-pull-request-comment@v1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
number: ${{ github.event.issue.number }} | |
header: Broken Links | |
message: | | |
${{steps.link-report.outputs.result}} |