Skip to content

Commit

Permalink
Split link checking into its own job (#1551)
Browse files Browse the repository at this point in the history
  • Loading branch information
bash authored Jul 15, 2024
1 parent ab65153 commit 0ea4f35
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]
if: ${{ steps.changed-files.outputs.changed_files != '' }}
Expand All @@ -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:
Expand Down

0 comments on commit 0ea4f35

Please sign in to comment.