GitHub Pages #110
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: GitHub Pages | |
| on: | |
| workflow_run: | |
| workflows: | |
| - Nightly Build | |
| types: | |
| - completed | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| inputs: | |
| debug: | |
| description: 'Whether to build in debug mode' | |
| required: false | |
| default: 'false' | |
| jobs: | |
| build: | |
| name: Build Web Site | |
| if: | | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.ref }} | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| ref: ${{ github.event.workflow_run.head_sha || github.sha }} | |
| - name: Build Soluna | |
| uses: ./.github/actions/soluna | |
| id: build | |
| with: | |
| soluna_path: "." | |
| debug: ${{ github.event.inputs.debug }} | |
| - name: Build Sample | |
| uses: ./.github/actions/sample | |
| id: sample | |
| with: | |
| soluna_path: "." | |
| - name: Build Astro | |
| uses: withastro/action@v6 | |
| env: | |
| SITE_BASE: /soluna/ | |
| SOLUNA_JS_PATH: ${{ steps.build.outputs.SOLUNA_JS_PATH }} | |
| SOLUNA_WASM_PATH: ${{ steps.build.outputs.SOLUNA_WASM_PATH }} | |
| SOLUNA_WASM_MAP_PATH: ${{ steps.build.outputs.SOLUNA_WASM_MAP_PATH }} | |
| SAMPLE_WASM_PATH: ${{ steps.sample.outputs.SAMPLE_WASM_PATH }} | |
| with: | |
| path: website | |
| node-version: 24 | |
| package-manager: pnpm@10.28.2 | |
| build-cmd: pnpm run build | |
| out-dir: dist | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| if: | | |
| (github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')) && | |
| github.actor != 'nektos/act' | |
| 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@v4 |