Add automatic deployments
Some checks failed
CI / build (push) Failing after 26s

This commit is contained in:
ultrablob 2025-02-06 18:31:18 -05:00
parent d77daedf56
commit 3d6a18c21e

View file

@ -1,5 +1,3 @@
# This is a basic workflow to help you get started with Actions
name: CI name: CI
# Controls when the action will run. # Controls when the action will run.
@ -16,8 +14,6 @@ on:
env: env:
GODOT_VERSION: "4.3" GODOT_VERSION: "4.3"
GODOT_BUILD: "stable" GODOT_BUILD: "stable"
BUILD_TYPE: >
{{ env.GITHUB_EVENT_NAME == "push" && "release" || "debug" }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
@ -30,6 +26,14 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
- name: Build Release
if: env.GITHUB_EVENT_NAME == "push"
run: echo "BUILD_TYPE=release" >> $GITHUB_ENV
- name: Build Debug/Beta
if: env.GITHUB_EVENT_NAME == "pull_request"
run: echo "BUILD_TYPE=debug" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2 - uses: actions/checkout@v2
name: Checkout Files name: Checkout Files
@ -63,9 +67,14 @@ jobs:
- name: Upload Build - name: Upload Build
uses: https://code.forgejo.org/forgejo/upload-artifact@v4 uses: https://code.forgejo.org/forgejo/upload-artifact@v4
id: upload-build
with: with:
name: Web Build name: Web Build
path: build/web path: build/web
retention-days: 3 retention-days: 3
overwrite: true overwrite: true
compression-level: 0 compression-level: 0
- name: "Trigger Deployment"
run: curl "http://webhookd:8080/deploy_game?ID=${{ steps.upload-build.outputs.artifact-id }}"
if: env.GITHUB_EVENT_NAME == "push"