added deploy to itch io #82
This file contains hidden or 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: Build and deploy game | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup Rust toolchain | |
| uses: hecrj/setup-rust-action@v2.0.1 | |
| with: | |
| rust-version: stable | |
| - name: Build WASM artifact to docs/ | |
| run: make build-wasm | |
| - name: Copy assets to static folder | |
| run: | | |
| cp -r $GITHUB_WORKSPACE/assets/ docs/assets | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload GitHub Pages artifact | |
| uses: actions/upload-pages-artifact@v3.0.0 | |
| with: | |
| path: docs/ | |
| retention-days: 90 | |
| - name: Deploy GitHub Pages site | |
| uses: actions/deploy-pages@v4.0.5 | |
| - name: Deploy to itch.io | |
| uses: manleydev/butler-publish-itchio-action@master | |
| env: | |
| BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
| CHANNEL: html | |
| ITCH_GAME: fortress | |
| ITCH_USER: tvdboom | |
| PACKAGE: docs/ |