Hopefully fixes assets #54
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: Release to Github Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| Github-Pages-Release: | |
| timeout-minutes: 15 | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust Toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Setup Dioxus CLI | |
| run: cargo install dioxus-cli --locked | |
| - name: Build with Dioxus CLI | |
| run: | | |
| dx bundle --release | |
| cp target/dx/mxgordon-github-io/release/web/public/index.html target/dx/mxgordon-github-io/release/web/public/404.html | |
| - name: Copy assets to build output | |
| run: cp -r assets target/dx/mxgordon-github-io/release/web/public/ | |
| - name: Copy CNAME for custom domain | |
| run: cp CNAME target/dx/mxgordon-github-io/release/web/public/ | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './target/dx/mxgordon-github-io/release/web/public' | |
| - name: Deploy to GitHub Pages 🚀 | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |