Skip to content

Commit 432c07e

Browse files
committed
changes to deploy.yml
1 parent 40cd5b3 commit 432c07e

1 file changed

Lines changed: 40 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ concurrency:
2323
jobs:
2424
build:
2525
runs-on: ubuntu-latest
26+
27+
env:
28+
KOBWEB_CLI_VERSION: 0.9.21
29+
2630
steps:
2731
- name: Checkout
2832
uses: actions/checkout@v4
@@ -33,20 +37,53 @@ jobs:
3337
distribution: temurin
3438
java-version: 17
3539

36-
- name: Grant execute permission for gradlew
40+
- name: Ensure Gradle is executable
3741
run: chmod +x ./gradlew
3842

3943
- name: Setup Gradle
4044
uses: gradle/actions/setup-gradle@v4
4145

42-
- name: Build with Gradle
43-
run: ./gradlew kobwebExport --no-daemon
46+
- name: Query Browser Cache ID
47+
id: browser-cache-id
48+
run: echo "value=$(./gradlew -q :site:kobwebBrowserCacheId)" >> $GITHUB_OUTPUT
49+
50+
- name: Cache Browser Dependencies
51+
uses: actions/cache@v4
52+
id: playwright-cache
53+
with:
54+
path: ~/.cache/ms-playwright
55+
key: ${{ runner.os }}-playwright-${{ steps.browser-cache-id.outputs.value }}
56+
57+
- name: Fetch kobweb
58+
uses: robinraju/release-downloader@v1.9
59+
with:
60+
repository: "varabyte/kobweb-cli"
61+
tag: "v${{ env.KOBWEB_CLI_VERSION }}"
62+
fileName: "kobweb-${{ env.KOBWEB_CLI_VERSION }}.zip"
63+
tarBall: false
64+
zipBall: false
65+
66+
- name: Unzip kobweb
67+
run: unzip kobweb-${{ env.KOBWEB_CLI_VERSION }}.zip
4468

4569
- name: Upload artifact
4670
uses: actions/upload-pages-artifact@v3
4771
with:
4872
path: ./site/.kobweb/site
4973

74+
- name: Run export
75+
run: |
76+
cd site
77+
../kobweb-${{ env.KOBWEB_CLI_VERSION }}/bin/kobweb export --notty --layout static
78+
79+
- name: Upload site
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: site
83+
path: site/.kobweb/site/
84+
if-no-files-found: error
85+
retention-days: 1
86+
5087
deploy:
5188
environment:
5289
name: github-pages

0 commit comments

Comments
 (0)