Skip to content

Use nix in github actions #19

Use nix in github actions

Use nix in github actions #19

Workflow file for this run

name: Godot Export
on:
push:
branches:
- main
paths-ignore:
- "README.md"
- ".gitattributes"
- ".gitignore"
jobs:
export-web:
name: Web Export
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build Rust
run: cd ./rust/godot-neural-networks && nix develop --command cargo build -Zbuild-std=std,panic_abort --target wasm32-unknown-emscripten --release
# - name: Web Build
# run: |
# mkdir -v -p build/web
# godot --headless --verbose --export-release "Web" ../exports/
# ls -lah build/web
# - name: Netlify headers
# # https://github.com/godotengine/godot/issues/69020
# # https://github.com/godotengine/godot/blob/master/platform/web/serve.py
# # https://docs.netlify.com/routing/headers/
# run: |
# cat <<EOF > build/web/_headers
# /*
# Cross-Origin-Opener-Policy: same-origin
# Cross-Origin-Embedder-Policy: require-corp
# Access-Control-Allow-Origin: *
# EOF
# cat build/web/_headers
# - name: Deploy artifacts to `artifacts` branch
# uses: s0/git-publish-subdir-action@develop
# env:
# REPO: self
# BRANCH: gh-pages
# FOLDER: ./build/web
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}