GitHub Pages #348
Workflow file for this run
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 }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| ref: ${{ github.event.workflow_run.head_sha || github.sha }} | |
| - name: Build Soluna (WASM) | |
| uses: ./.github/actions/soluna | |
| id: build | |
| with: | |
| soluna_path: "." | |
| debug: ${{ github.event.inputs.debug }} | |
| - name: Build WASM side module (sample) | |
| uses: ./.github/actions/sample | |
| id: sample | |
| with: | |
| soluna_path: "." | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.28.2 | |
| - name: Install website dependencies | |
| run: pnpm --dir website install --frozen-lockfile | |
| - name: Build | |
| run: pnpm --dir website run build:pages | |
| env: | |
| 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 }} | |
| - name: Upload static files as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: website/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 |