Skip to content

Commit 3e0a909

Browse files
brunoborgesCopilot
andcommitted
Switch deploy workflow from Python to JBang with dependency caching
- Replace setup-python + generate.py with setup-java + setup-jbang + Generate.java - Cache ~/.jbang keyed on Generate.java hash for fast subsequent builds - Add Generate.java to trigger paths, remove generate.py - Use Temurin JDK 25 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b889dba commit 3e0a909

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
paths:
77
- '*/**.json'
88
- 'slug-template.html'
9-
- 'generate.py'
9+
- 'Generate.java'
1010
- 'index.html'
1111
- 'styles.css'
1212
- 'app.js'
@@ -31,12 +31,22 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@v4
3333

34-
- uses: actions/setup-python@v5
34+
- uses: actions/setup-java@v4
3535
with:
36-
python-version: '3.12'
36+
distribution: 'temurin'
37+
java-version: '25'
38+
39+
- uses: jbangdev/setup-jbang@main
40+
41+
- name: Cache JBang dependencies
42+
uses: actions/cache@v4
43+
with:
44+
path: ~/.jbang
45+
key: jbang-${{ runner.os }}-${{ hashFiles('Generate.java') }}
46+
restore-keys: jbang-${{ runner.os }}-
3747

3848
- name: Generate HTML pages and snippets.json
39-
run: python3 generate.py
49+
run: jbang Generate.java
4050

4151
- name: Setup Pages
4252
uses: actions/configure-pages@v5

0 commit comments

Comments
 (0)