Skip to content

Commit e448a20

Browse files
dev: checkout action v4 & sparse-checkout in GitHub workflows
1 parent 556c394 commit e448a20

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

.github/workflows/changelog-check.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
name: Changelog Check
55
on:
66
pull_request:
7-
paths-ignore:
8-
- "README.md"
9-
- "CHANGELOG.md"
107
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
118

129
jobs:
@@ -18,19 +15,14 @@ jobs:
1815
- run: echo "🐧 Job running on ${{ runner.os }} server"
1916
- run: echo "🐙 Using ${{ github.ref }} branch from ${{ github.repository }} repository"
2017

21-
# Git Checkout
2218
- name: Checkout Code
2319
uses: actions/checkout@v4
2420
with:
2521
fetch-depth: 0
2622
sparse-checkout: |
2723
CHANGELOG.md
28-
- run: echo "🐙 Sparse Checkout of ${{ github.repository }} repository to the CI runner."
29-
with:
30-
token: "${{ secrets.PAT || secrets.GITHUB_TOKEN }}"
31-
- run: echo "🐙 ${{ github.repository }} repository was cloned to the runner."
24+
- run: echo "🐙 ${{ github.repository }} repository sparse-checkout to the CI runner."
3225

33-
# Changelog Enforcer
3426
- name: Changelog Enforcer
3527
uses: dangoslen/changelog-enforcer@v3
3628
with:

.github/workflows/megalinter.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ name: MegaLinter
77
on:
88
workflow_dispatch:
99
pull_request:
10-
branches: [ main ]
10+
branches: [main]
1111
push:
12-
branches: [ main ]
12+
branches: [main]
1313

1414
# Run Linters in parallel
1515
# Cancel running job if new job is triggered
@@ -30,6 +30,7 @@ jobs:
3030
- name: Checkout Code
3131
uses: actions/checkout@v4
3232
with:
33+
token: "${{ secrets.PAT || secrets.GITHUB_TOKEN }}"
3334
fetch-depth: 0
3435
sparse-checkout: |
3536
docs

.github/workflows/publish-book.yaml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ on:
88
workflow_run:
99
workflows:
1010
- "MegaLinter"
11-
paths-ignore:
12-
- README.md
13-
- CHANGELOG.md
14-
- .gitignore
11+
paths:
12+
- "docs/**"
13+
- "includes/**"
14+
- "overrides/**"
15+
- "mkdocs.yaml"
1516
branches:
1617
- main
1718
types:
@@ -21,27 +22,37 @@ permissions:
2122
contents: write
2223

2324
jobs:
24-
deploy:
25+
publish-book:
26+
name: MkDocs Publish
2527
runs-on: ubuntu-latest
2628
steps:
27-
- uses: actions/checkout@v4
29+
- run: echo "🚀 Job automatically triggered by ${{ github.event_name }}"
30+
- run: echo "🐧 Job running on ${{ runner.os }} server"
31+
- run: echo "🐙 Using ${{ github.ref }} branch from ${{ github.repository }} repository"
32+
33+
- name: Checkout Code
34+
uses: actions/checkout@v4
2835
with:
2936
fetch-depth: 0
3037
sparse-checkout: |
3138
docs
3239
overrides
33-
- run: echo "🐙 Sparse Checkout of ${{ github.repository }} repository to the CI runner."
34-
- uses: actions/setup-python@v4
40+
- run: echo "🐙 ${{ github.repository }} repository sparse-checkout to the CI runner."
41+
- name: Setup Python
42+
uses: actions/setup-python@v4
3543
with:
3644
python-version: 3.x
37-
- uses: actions/cache@v3
45+
46+
- name: Cache
47+
uses: actions/cache@v3
3848
with:
3949
key: ${{ github.ref }}
4050
path: .cache
51+
4152
- run: pip install mkdocs-material mkdocs-callouts mkdocs-glightbox mkdocs-git-revision-date-localized-plugin mkdocs-redirects pillow cairosvg
4253
- run: mkdocs gh-deploy --force
4354
- run: echo "🐙 ."
4455

4556
# Summary and status
46-
- run: echo "🎨 MkDocs book workflow ended"
57+
- run: echo "🎨 MkDocs Publish Book workflow completed"
4758
- run: echo "🍏 Job status is ${{ job.status }}."

.github/workflows/scheduled-version-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- run: echo "🐙 Using ${{ github.ref }} branch from ${{ github.repository }} repository"
3333

3434
- name: "Checkout code"
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636
- run: echo "🐙 ${{ github.repository }} repository was cloned to the runner."
3737

3838
- name: "Antq Check versions"

0 commit comments

Comments
 (0)