Skip to content

Commit 60dc7da

Browse files
committed
Scope demo build step to demo changes
1 parent eff6236 commit 60dc7da

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/developer-guide-docs.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,30 @@ jobs:
2323
- name: Check out repository
2424
uses: actions/checkout@v4
2525

26+
- name: Determine changed components
27+
id: changes
28+
if: github.event_name == 'pull_request'
29+
uses: dorny/paths-filter@v3
30+
with:
31+
filters: |
32+
demos:
33+
- 'docs/demos/**'
34+
docs:
35+
- 'docs/developer-guide/**'
36+
2637
- name: Set up Java
2738
uses: actions/setup-java@v4
2839
with:
2940
distribution: 'temurin'
3041
java-version: '11'
3142

3243
- name: Build Codename One demos
44+
if: github.event_name != 'pull_request' || steps.changes.outputs.demos == 'true'
3345
run: |
3446
set -euo pipefail
3547
mkdir -p "$HOME/.codenameone"
3648
touch "$HOME/.codenameone/guibuilder.jar"
37-
printf 'Manifest-Version: 1.0\n' > /tmp/cn1-manifest.mf
38-
jar cfm "$HOME/.codenameone/CodeNameOneBuildClient.jar" /tmp/cn1-manifest.mf
49+
cp maven/CodeNameOneBuildClient.jar "$HOME/.codenameone/CodeNameOneBuildClient.jar"
3950
xvfb-run -a mvn -B -ntp -Dgenerate-gui-sources-done=true -pl common -am -f docs/demos/pom.xml test
4051
4152
- name: Determine publication metadata
@@ -103,6 +114,7 @@ jobs:
103114
gem install --no-document asciidoctor asciidoctor-pdf
104115
105116
- name: Build Developer Guide HTML and PDF
117+
if: github.event_name != 'pull_request' || steps.changes.outputs.docs == 'true' || steps.changes.outputs.demos == 'true'
106118
run: |
107119
set -euo pipefail
108120
OUTPUT_ROOT="build/developer-guide"

0 commit comments

Comments
 (0)