Skip to content

Load configuration from file #89

Load configuration from file

Load configuration from file #89

Workflow file for this run

# Uses https://game.ci/docs/github/getting-started
name: Actions
on: [push, pull_request]
jobs:
build:
name: Build my project ✨
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true
# Cache
- uses: actions/cache@v2
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# Test
# - name: Run tests
# uses: game-ci/unity-test-runner@v2
# env:
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
# with:
# githubToken: ${{ secrets.GITHUB_TOKEN }}
# Build
- name: Build project
uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: WebGL
# Output
- uses: actions/upload-artifact@v2
with:
name: Build
path: build/WebGL/WebGL
- uses: actions/upload-pages-artifact@v1
if: github.ref_name == 'main'
with:
path: build/WebGL/WebGL
# see: https://github.com/actions/deploy-pages
deploy:
if: github.ref_name == 'main'
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2