Skip to content

Build and deploy the website :3 #5

Build and deploy the website :3

Build and deploy the website :3 #5

Workflow file for this run

name: Build and deploy the website :3
on:
push:
branches: [$default-branch]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
env:
BUILD_PATH: "."
jobs:
build:
name: Build page with perseus
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Cache dependencies
uses: actions/cache@v2
env:
cache-name: cache-dependencies
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
target
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
- name: Install perseus
run: cargo install perseus-cli
- name: Build page
run: perseus --wasm-opt-version version_118 export --release
- name: Build Babiano project
run: |
cd ./sub/projects/babiano
./export_singlepage.sh
cp -r ./dist/exported/* ../../../dist/exported/
shell: bash
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.BUILD_PATH }}/dist/exported
deploy:
name: Deploy to github pages
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4