Skip to content

Initial commit

Initial commit #1

Workflow file for this run

name: Build and Deploy WebGL to GitHub Pages
on:
push:
branches:
- main
jobs:
build:
name: Build WebGL
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3
with:
path: Library
key: Library-WebGL
restore-keys: Library-
- uses: game-ci/unity-builder@v4
id: unity_build
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: WebGL
- uses: actions/upload-artifact@v4
with:
name: webgl-build
path: build
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download WebGL build artifact
uses: actions/download-artifact@v4
with:
name: webgl-build
path: build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/WebGL/WebGL
# Опционально:
# publish_branch: gh-pages
# destination_dir: /