Skip to content

gh-pages

gh-pages #7

Workflow file for this run

name: gh-pages
on:
push:
tags:
- '*'
workflow_dispatch:
branches:
- main
jobs:
build:
name: Build - ${{ matrix.targetPlatform }} - Unity ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
environment: Unity build
strategy:
fail-fast: false
matrix:
unityVersion:
- 2022.3.8f1
targetPlatform:
- WebGL
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: true
path: .
# Cache
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# Build
- name: Build project
uses: game-ci/unity-builder@v3
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/${{ matrix.targetPlatform }}/WebGL # The folder the action should deploy.