Merge pull request #159 from kubereboot/dependabot/npm_and_yarn/postc… #450
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: lychee link Checker | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| jobs: | |
| linkChecker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 16 | |
| - run: npm install | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: 'latest' | |
| extended: true | |
| - uses: actions/cache@v4.2.0 | |
| with: | |
| path: /tmp/hugo_cache | |
| key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-hugomod- | |
| - name: Build | |
| run: hugo --minify | |
| - name: Restore lychee cache | |
| uses: actions/cache@v4.2.0 | |
| with: | |
| path: .lycheecache | |
| key: cache-lychee-${{ github.sha }} | |
| restore-keys: cache-lychee- | |
| - name: Link Checker | |
| uses: lycheeverse/lychee-action@f613c4a64e50d792e0b31ec34bbcbba12263c6a6 | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| with: | |
| # Check all markdown and html files in repo (default) | |
| args: --verbose --exclude-link-local --no-progress './content/**' './public/**/*.html' | |
| # Use json as output format (instead of markdown) | |
| format: json | |
| # Use different output file path | |
| output: /tmp/foo.txt | |
| # Fail action on broken links | |
| fail: true |