Skip to content

Commit 54831a9

Browse files
committed
Split link checking into its own job
1 parent 629804c commit 54831a9

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

Diff for: .github/workflows/ci.yml

+24-18
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,32 @@ jobs:
1515
# https://github.com/crazy-max/ghaction-github-pages/issues/1#issuecomment-623202206
1616
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1717
steps:
18+
- uses: actions/checkout@v4
19+
- name: Lint
20+
uses: avto-dev/markdown-lint@v1
21+
with:
22+
args: '.'
23+
config: '.markdownlint.json'
24+
- name: Install Zola
25+
run: |
26+
curl -L ${BASE_URL}/${VERS}/zola-${VERS}-${ARCH}.tar.gz | tar -xz
27+
echo "Zola version: $(./zola --version)"
28+
- name: Zola build
29+
run: ./zola build
30+
- name: Deploy
31+
if: github.ref == 'refs/heads/source'
32+
uses: crazy-max/ghaction-github-pages@v1
33+
with:
34+
build_dir: public
35+
target_branch: master
36+
37+
links:
38+
name: Links
39+
runs-on: ubuntu-latest
40+
steps:
1841
- uses: actions/checkout@v4
1942
with:
20-
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
43+
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
2144
- name: Get changed files
2245
id: changed-files
2346
# source: https://stackoverflow.com/a/74268200, added filtering for markdown files
@@ -29,11 +52,6 @@ jobs:
2952
fi
3053
echo "changed_files: $changed_files"
3154
echo "changed_files=$changed_files" >> $GITHUB_OUTPUT
32-
- name: Lint
33-
uses: avto-dev/markdown-lint@v1
34-
with:
35-
args: '.'
36-
config: '.markdownlint.json'
3755
- name: Check links
3856
uses: lycheeverse/[email protected]
3957
if: ${{ steps.changed-files.outputs.changed_files != '' }}
@@ -48,15 +66,3 @@ jobs:
4866
--exclude 'https://www.patreon.com'
4967
--exclude 'https://gamedev.social'
5068
${{ steps.changed-files.outputs.changed_files }}
51-
- name: Install Zola
52-
run: |
53-
curl -L ${BASE_URL}/${VERS}/zola-${VERS}-${ARCH}.tar.gz | tar -xz
54-
echo "Zola version: $(./zola --version)"
55-
- name: Zola build
56-
run: ./zola build
57-
- name: Deploy
58-
if: github.ref == 'refs/heads/source'
59-
uses: crazy-max/ghaction-github-pages@v1
60-
with:
61-
build_dir: public
62-
target_branch: master

0 commit comments

Comments
 (0)