Skip to content

Liens morts

Liens morts #1244

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Liens morts
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# Install NPM dependencies, cache them correctly
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# Cache node_modules. To cache global, you may try ~/.npm
path: ./node_modules
key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-cache-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm i
- run: npm run build
- run: npm run start &
env:
PORT: 3000
# wait for the server to start responding. We expect Bad Request 400 once it starts listening.
# so override the shell and have the last command be the : { null } command to force exit code 0.
- run: wget --retry-connrefused --waitretry=5 --read-timeout=10 --timeout=15 -t 50 http://localhost:3000/sitemap.xml
- run: |
npm run check-broken-links