Skip to content

chore: stop tracking /ProjectSettings/ProjectVersion.txt #3

chore: stop tracking /ProjectSettings/ProjectVersion.txt

chore: stop tracking /ProjectSettings/ProjectVersion.txt #3

Workflow file for this run

name: Build Unity project
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
name: Build WebGL & Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# - name: Run tests
# uses: game-ci/unity-test-runner@v4
# env:
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
# UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# with:
# githubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Build project
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: WebGL
- uses: actions/upload-artifact@v3
with:
name: Build
path: build
- name: Copy the WebGL build artifacts to the GitHub Pages directory
env:
WEBGL_BUILD_PATH: ${{ format('{0}/build', github.workspace) }}
WEBGL_PAGES_PATH: ${{ format('{0}/docs', github.workspace) }}
run: find $WEBGL_BUILD_PATH -type f -name "**WebGL.*" -exec cp {} $WEBGL_PAGES_PATH \;
- name: Deploy to GitHub Pages
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: gh-pages
file_pattern: docs/**
commit_message: Deploy to GitHub Pages