better host #6
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: Page Publish | |
on: | |
push: | |
branches: | |
- main | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
page: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Emscripten | |
uses: mymindstorm/setup-emsdk@v14 | |
- name: Setup Ninja | |
run: sudo apt update && sudo apt install -y ninja-build | |
- name: Setup wasi SDK | |
run: sudo mkdir -p /opt/ && wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-linux.tar.gz && tar xzf wasi-sdk-22.0-linux.tar.gz && sudo mv wasi-sdk-22.0 /opt/wasi-sdk | |
- name: Build Site | |
run: ./build.sh && mkdir -p dist && cp -R build index.html dist | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'dist' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |