Skip to content

Commit

Permalink
Add github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ApmeM committed Jul 6, 2023
1 parent 24ff545 commit fec1fc3
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ permissions:
id-token: write
packages: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -55,6 +60,59 @@ jobs:
name: nuget
path: ./MazeGenerators/bin/Release/MazeGenerators.*.nupkg

godot:
needs: build
runs-on: ubuntu-latest
name: Build artifacts
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 2.2.108
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Restore packages
run: |
dotnet restore "./MazeGenerators.Demo/Maze Generators Demo.sln"
- name: Export game
id: export
uses: firebelley/[email protected]
with:
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.5.1/mono/Godot_v3.5.1-stable_mono_linux_headless_64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.5.1/mono/Godot_v3.5.1-stable_mono_export_templates.tpz
relative_project_path: ./MazeGenerators.Demo/
export_debug: false
use_preset_export_path: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: ${{ steps.export.outputs.build_directory }}/HTML5


deploy_html5:
needs: godot
name: Deploy to github pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

pack:
needs: build
Expand Down
34 changes: 34 additions & 0 deletions MazeGenerators.Demo/export_presets.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[preset.0]

name="HTML5"
platform="HTML5"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter="*.ttf, *.json"
exclude_filter=""
export_path="../build/html/Godot.html"
script_export_mode=1
script_encryption_key=""

[preset.0.options]

custom_template/debug=""
custom_template/release=""
variant/export_type=0
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/export_icon=true
html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false
progressive_web_app/offline_page=""
progressive_web_app/display=1
progressive_web_app/orientation=0
progressive_web_app/icon_144x144=""
progressive_web_app/icon_180x180=""
progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color( 0, 0, 0, 1 )

0 comments on commit fec1fc3

Please sign in to comment.