Skip to content

GitHub Pages

GitHub Pages #16

Workflow file for this run

name: GitHub Pages
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build:
name: Build Web Site
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master'
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0
- name: Build Soluna (WASM)
uses: ./.github/actions/soluna
id: build
with:
soluna_path: "."
- name: Install web build tools
run: |
sudo apt-get update
sudo apt-get install -y lua5.4 zip
- name: Prepare web assets
run: |
lua5.4 script/build_web.lua \
--soluna . \
--site web \
--wasm "${{ steps.build.outputs.SOLUNA_WASM_PATH }}" \
--js "${{ steps.build.outputs.SOLUNA_JS_PATH }}"
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.119.0"
- name: Build
run: hugo --source web --minify
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: web/public
deploy:
name: Deploy to GitHub Pages
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master'
needs: [build]
runs-on: ubuntu-22.04
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