chore: update ghpages action to reflect new module and repo layout (#29) #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
name: ghpages | |
on: | |
push: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.0 | |
- name: Install gogio | |
run: go install gioui.org/cmd/gogio@latest | |
- name: Build wasm assets | |
run: gogio -target js -ldflags="-s -w" -o wasm_assets gio.tools/icons/cmd/gio-icon-browser | |
- name: Upload wasm assets | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./wasm_assets | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |