Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions .github/workflows/build-webgl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ name: AIS Prototype Build
# way of doing this.
on:
push:
delete:
workflow_dispatch:

jobs:
build:
name: Build Unity Project
if: github.event_name != 'delete'
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -88,7 +90,7 @@ jobs:
- name: Upload build as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-webgl_${{ env.VERSION }}
name: ${{ github.event.repository.name }}-webgl-${{ github.sha }}
path: build/WebGL/WebGL/
overwrite: true

Expand All @@ -101,4 +103,27 @@ jobs:
remote_host: ${{ secrets.FIELDDAY_WISC_EDU_DEPLOY_HOST }}
remote_user: ${{ secrets.FIELDDAY_WISC_EDU_DEPLOY_USER }}
remote_key: ${{ secrets.FIELDDAY_WISC_EDU_DEPLOY_KEY }}


# Vault staging CDN preview of the same build, alongside the DoIT deploy above until DoIT is retired:
# https://cdn.vaultlearninggames-staging.org/fielddaylab/ais-prototype/<branch>/
# Runs even if the DoIT upload fails; needs only the build artifact.
preview:
needs: build
if: ${{ !cancelled() && github.event_name != 'delete' }}
permissions:
contents: read
id-token: write
uses: fielddaylab/vault-publisher/.github/workflows/publish-preview.yml@v1
with:
game: ais-prototype
artifact: ${{ github.event.repository.name }}-webgl-${{ github.sha }}

# Deleting a branch removes its preview.
remove-preview:
if: github.event_name == 'delete'
permissions:
contents: read
id-token: write
uses: fielddaylab/vault-publisher/.github/workflows/publish-preview.yml@v1
with:
game: ais-prototype
Loading