Check for dead links #5057
Workflow file for this run
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: Zola | |
on: | |
push: | |
branches: source | |
pull_request: | |
jobs: | |
zola: | |
runs-on: ubuntu-latest | |
env: | |
BASE_URL: https://github.com/getzola/zola/releases/download | |
VERS: v0.15.2 | |
ARCH: x86_64-unknown-linux-gnu | |
# https://github.com/crazy-max/ghaction-github-pages/issues/1#issuecomment-623202206 | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Lint | |
uses: avto-dev/markdown-lint@v1 | |
with: | |
args: '.' | |
config: '.markdownlint.json' | |
- name: Check for dead links | |
run: | | |
npm install -g @umbrelladocs/linkspector | |
echo "linkspector version: $(linkspector --version)" | |
echo "Files changed: $(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.md$')" | |
linkspector check $(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.md$') | |
- name: Install Zola | |
run: curl -L ${BASE_URL}/${VERS}/zola-${VERS}-${ARCH}.tar.gz | tar -xz | |
- run: ./zola --version | |
- run: ./zola build | |
- name: Deploy | |
if: github.ref == 'refs/heads/source' | |
uses: crazy-max/ghaction-github-pages@v1 | |
with: | |
build_dir: public | |
target_branch: master |