Scheduled Broken Links Checker #40
This file contains hidden or 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: Scheduled Broken Links Checker | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }} | |
env: | |
VITE_PORTAL_API_URL: ${{ vars.VITE_PORTAL_API_URL }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
submodules: 'recursive' | |
# Configure Ruby to build Jekyll site | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@6c79f721fa26dd64559c2700086ac852c18e0756 # v1 | |
with: | |
ruby-version: .ruby-version | |
- name: Ruby gem cache | |
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 | |
with: | |
path: ${{ github.workspace }}/vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Bundle Setup | |
run: bundle config path ${{ github.workspace }}/vendor/bundle | |
- name: Bundle Install | |
run: bundle install --jobs 4 --retry 3 | |
# Configure Node to build assets | |
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
with: | |
node-version: "22" | |
- name: Cache node modules | |
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
- name: npm install | |
run: npm ci | |
# Build the Docs | |
- name: Build Docs | |
run: | | |
exe/build | |
- name: Run site | |
run: | | |
npx netlify dev --context test & npx wait-on http://localhost:8888 | |
- name: Run link checker | |
run: | | |
cd tools/broken-link-checker | |
npm ci | |
node full.js --host http://localhost:8888 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |