Skip to content

Commit 1dd0ec1

Browse files
committed
Update GitHub Actions workflows to include path filters for docs and src directories
1 parent 93c7319 commit 1dd0ec1

File tree

2 files changed

+48
-43
lines changed

2 files changed

+48
-43
lines changed

.github/workflows/docs.yml

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,66 @@
11
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
workflow_dispatch:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- docs/**/*
9+
workflow_dispatch:
810

911
permissions:
10-
contents: read
11-
pages: write
12-
id-token: write
12+
contents: read
13+
pages: write
14+
id-token: write
1315

1416
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1517
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1618
concurrency:
17-
group: "pages"
18-
cancel-in-progress: false
19+
group: "pages"
20+
cancel-in-progress: false
1921

2022
jobs:
21-
build:
22-
runs-on: ubuntu-latest
23+
build:
24+
runs-on: ubuntu-latest
2325

24-
defaults:
25-
run:
26-
working-directory: ./docs
26+
defaults:
27+
run:
28+
working-directory: ./docs
2729

28-
steps:
29-
- name: Checkout
30-
uses: actions/checkout@v4
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
3133

32-
- name: Setup Ruby
33-
uses: ruby/setup-ruby@v1
34-
with:
35-
ruby-version: "3.1.1"
36-
bundler-cache: true
37-
working-directory: ./docs
34+
- name: Setup Ruby
35+
uses: ruby/setup-ruby@v1
36+
with:
37+
ruby-version: "3.1"
38+
bundler-cache: true
39+
working-directory: ./docs
3840

39-
- name: Setup Pages
40-
uses: actions/configure-pages@v5
41+
- name: Setup Pages
42+
uses: actions/configure-pages@v5
4143

42-
- name: Build with Jekyll
43-
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
44-
env:
45-
JEKYLL_ENV: production
44+
- name: Build with Jekyll
45+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
46+
env:
47+
JEKYLL_ENV: production
4648

47-
- name: Upload artifact
48-
uses: actions/upload-pages-artifact@v3
49-
with:
50-
path: ./docs/_site
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: ./docs/_site
5153

52-
deploy:
53-
runs-on: ubuntu-latest
54+
deploy:
55+
runs-on: ubuntu-latest
5456

55-
environment:
56-
name: github-pages
57-
url: ${{ steps.deployment.outputs.page_url }}
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
5860

59-
needs: build
61+
needs: build
6062

61-
steps:
62-
- name: Deploy to GitHub Pages
63-
id: deployment
64-
uses: actions/deploy-pages@v4
63+
steps:
64+
- name: Deploy to GitHub Pages
65+
id: deployment
66+
uses: actions/deploy-pages@v4

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches:
66
- master
7+
paths:
8+
- src/**/*
9+
- Directory.Build.props
710
pull_request:
811
branches:
912
- master

0 commit comments

Comments
 (0)