-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (39 loc) · 1.16 KB
/
build_web.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build web
on: [push, pull_request]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4 # set up Java for Gradle
with:
distribution: 'temurin'
java-version: '21'
- name: Install wasm-pack
run: npm install -g wasm-pack
- name: Build
run: ./gradlew buildWeb
- name: Checkout pages
# Only run for the release branch
if: github.ref == 'refs/heads/main'
uses: actions/checkout@v4
with:
ref: pages
path: pages
- name: Commit web content
# Only run for the release branch
if: github.ref == 'refs/heads/main'
run: |
# Remove existing files and copy new files
./gradlew refreshWebFiles
# Set committer details (see actions/checkout README)
cd pages
git config user.name github-actions
git config user.email [email protected]
# Commit and push
git add .
git commit -m "Update files"
git push