From 0ea4f35e3fb6c2e148c9c5630b6d02a70b9da168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tau=20G=C3=A4rtli?= Date: Mon, 15 Jul 2024 20:36:27 +0200 Subject: [PATCH] Split link checking into its own job (#1551) --- .github/workflows/ci.yml | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d65e0b443..2b95c34e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,29 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 + - name: Lint + uses: avto-dev/markdown-lint@v1 + with: + args: '.' + config: '.markdownlint.json' + - name: Install Zola + run: | + curl -L ${BASE_URL}/${VERS}/zola-${VERS}-${ARCH}.tar.gz | tar -xz + echo "Zola version: $(./zola --version)" + - name: Zola build + run: ./zola build + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v3 with: - fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }} + path: public + + links: + name: Check for Broken Links + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }} - name: Get changed files id: changed-files # source: https://stackoverflow.com/a/74268200, added filtering for markdown files @@ -29,11 +50,6 @@ jobs: fi echo "changed_files: $changed_files" echo "changed_files=$changed_files" >> $GITHUB_OUTPUT - - name: Lint - uses: avto-dev/markdown-lint@v1 - with: - args: '.' - config: '.markdownlint.json' - name: Check links uses: lycheeverse/lychee-action@v1.9.0 if: ${{ steps.changed-files.outputs.changed_files != '' }} @@ -50,17 +66,7 @@ jobs: --exclude 'dev.epicgames.com' --exclude-path 'assets/logo/readme.md' ${{ steps.changed-files.outputs.changed_files }} - - name: Install Zola - run: | - curl -L ${BASE_URL}/${VERS}/zola-${VERS}-${ARCH}.tar.gz | tar -xz - echo "Zola version: $(./zola --version)" - - name: Zola build - run: ./zola build - - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@v3 - with: - path: public - + pages: needs: zola permissions: