Skip to content

Commit

Permalink
Split link checking into its own job
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Jul 7, 2024
1 parent 629804c commit 54831a9
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,32 @@ jobs:
# https://github.com/crazy-max/ghaction-github-pages/issues/1#issuecomment-623202206
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: Deploy
if: github.ref == 'refs/heads/source'
uses: crazy-max/ghaction-github-pages@v1
with:
build_dir: public
target_branch: master

links:
name: Links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
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 +52,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 @@ -48,15 +66,3 @@ jobs:
--exclude 'https://www.patreon.com'
--exclude 'https://gamedev.social'
${{ 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: Deploy
if: github.ref == 'refs/heads/source'
uses: crazy-max/ghaction-github-pages@v1
with:
build_dir: public
target_branch: master

0 comments on commit 54831a9

Please sign in to comment.