-
Notifications
You must be signed in to change notification settings - Fork 137
feat: change link checking to periodic #1140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
B4nan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets revert the whitespace changes unless the other workflows use 2 spaces for indents
.github/workflows/lychee.yml
Outdated
| continue-on-error: true | ||
|
|
||
| - name: Add job summary | ||
| if: always() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats the point of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that this creates job summary that can be later found within Actions UI based on the .md file created during the run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i mean what is the point of using if: always()? removing that line should have the same effect unless i am missing something :]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah fair enough, this was supposed to make sure job summary gets created even if previous steps fail, but not sure if this is correct way to do it and if you think it should be removed , let's remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i see, never saw it before. i dont mind keeping it there if it actually does something, up to you really, maybe keep it and remove once you see its not adding value for the broke builds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that makes sense to me
.github/workflows/lychee.yml
Outdated
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please revert those whitespace changes too, the indent should be 4 spaces, not 4 and sometimes 2 at the end...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk how you format this, webstorm handles this correctly out of box, here is the full formatted file:
name: Periodic Link Checker
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC
workflow_dispatch: # Allow manual triggering
jobs:
link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: 'package-lock.json'
always-auth: 'true'
registry-url: 'https://npm.pkg.github.com/'
scope: '@apify-packages'
- name: Build docs
run: |
npm ci --force
npm update @apify/openapi
npm run build
env:
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_PROJECT_KEY }}
- name: Run Lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.10.0
env:
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
with:
fail: false
args: >
--base https://docs.apify.com
--exclude-path 'build/versions.html'
--max-retries 6
--verbose
--no-progress
--accept '100..=103,200..=299,403..=403,429'
--output ./lychee/out.md
--format markdown
'./build/**/*.html'
continue-on-error: true
- name: Add job summary
if: always()
run: cat ./lychee/out.md >> $GITHUB_STEP_SUMMARY
B4nan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i
.github/workflows/lychee.yml
Outdated
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk how you format this, webstorm handles this correctly out of box, here is the full formatted file:
name: Periodic Link Checker
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC
workflow_dispatch: # Allow manual triggering
jobs:
link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: 'package-lock.json'
always-auth: 'true'
registry-url: 'https://npm.pkg.github.com/'
scope: '@apify-packages'
- name: Build docs
run: |
npm ci --force
npm update @apify/openapi
npm run build
env:
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_PROJECT_KEY }}
- name: Run Lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.10.0
env:
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
with:
fail: false
args: >
--base https://docs.apify.com
--exclude-path 'build/versions.html'
--max-retries 6
--verbose
--no-progress
--accept '100..=103,200..=299,403..=403,429'
--output ./lychee/out.md
--format markdown
'./build/**/*.html'
continue-on-error: true
- name: Add job summary
if: always()
run: cat ./lychee/out.md >> $GITHUB_STEP_SUMMARY|
Thank you, not sure what is the issue with VSC and formatting ¯_(ツ)_/¯ |
|
@B4nan are any other changes needed or can we move forward with merging thit change? |
Given the amount of false positives we run into at every time when we are adding a new page to docs, it makes sense to change the link checking job to periodic instead of at every PR.