Deploy to github pages #1
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
name: Deploy | |
on: push | |
permissions: | |
contents: write | |
jobs: | |
build-web: | |
name: Build (Web) | |
runs-on: ubuntu-latest | |
container: kuviman/geng | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: cargo geng build --release --target wasm32-unknown-unknown | |
- name: Upload artifacts (web) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: web | |
path: target/geng | |
deploy-pages: | |
name: Deploy Github Pages | |
if: github.ref == 'refs/heads/main' && github.repository_owner == 'nertsal' | |
runs-on: ubuntu-latest | |
needs: | |
- build-web | |
environment: | |
name: main | |
url: https://nertsal.github.io/horns-of-combustion | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
- name: Deploy GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: web | |
# deploy-itch: | |
# name: Deploy Itch | |
# if: github.ref == 'refs/heads/main' && github.repository_owner == 'nertsal' | |
# runs-on: ubuntu-latest | |
# needs: | |
# - build-web | |
# steps: | |
# - name: Download artifacts | |
# uses: actions/download-artifact@v3 | |
# - name: Upload itch.io (Web) | |
# uses: josephbmanley/butler-publish-itchio-action@master | |
# env: | |
# BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
# CHANNEL: html5 | |
# ITCH_GAME: close-to-light | |
# ITCH_USER: nertsal | |
# PACKAGE: web |