name: Check Links

on:
  push:
    branches:
      - "*"
      - "!staging.tmp"
    tags:
      - "*"
  pull_request:
  schedule:
    - cron: "0 0 1/4 * *" # every 4 days

jobs:
  zola_check:
    name: "Zola Link Check"
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1

      - name: "Download Zola"
        run: curl -sL https://github.com/getzola/zola/releases/download/v0.17.2/zola-v0.17.2-x86_64-unknown-linux-gnu.tar.gz | tar zxv

      - name: "Run zola check"
        run: ../zola check
        working-directory: "blog"
