huh idgi #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# References from 2shady4u/godot-cpp-ci | |
name: "Github Pages" | |
on: | |
push | |
env: | |
GODOT_VERSION: 4.3 | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- run: cargo llvm-cov --html --all-features --workspace | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: rust-coverage | |
path: target/llvm-cov/html | |
wasm-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- uses: mymindstorm/setup-emsdk@v14 | |
with: | |
# pinned by godot/gdextension. | |
version: 3.1.19 | |
actions-cache-folder: emsdk-cache | |
- run: emcc -v | |
- uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- run: | | |
rustup toolchain install nightly | |
rustup component add rust-src --toolchain nightly | |
rustup target add wasm32-unknown-emscripten --toolchain nightly | |
cargo +nightly build -Zbuild-std --target wasm32-unknown-emscripten | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wasm-library | |
path: target | |
if-no-files-found: error | |
godot-web-export: | |
runs-on: ubuntu-latest | |
needs: [ wasm-build ] | |
container: | |
image: barichello/godot-ci:4.3 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- name: Write Commit Hash | |
run: git log -1 --format=reference > godot/ci-version.txt | |
- uses: actions/download-artifact@v4 | |
with: | |
name: wasm-library | |
path: target/ | |
- name: Godot Web Export | |
run: | | |
mkdir -v -p ~/.local/share/godot/templates | |
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable | |
mkdir -v -p build/web | |
godot -v --export "HTML5" ./build/web/index.html | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: godot-web-export | |
path: build/web | |
if-no-files-found: error | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [ coverage, godot-web-export ] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: rust-coverage | |
path: coverage | |
- uses: actions/download-artifact@v4 | |
with: | |
name: godot-web-export | |
- name: Deploy to GitHub Pages 🚀 | |
uses: JamesIves/github-pages-deploy-action@releases/v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build/web # The folder the action should deploy. |