2023-05-01 04:33:02 +00:00
|
|
|
name: deploy-docs
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-03-17 18:38:21 +00:00
|
|
|
|
2023-05-01 04:33:02 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
2024-03-17 18:38:21 +00:00
|
|
|
|
2023-05-01 04:33:02 +00:00
|
|
|
jobs:
|
|
|
|
build-docs:
|
|
|
|
runs-on: ubuntu-latest
|
2023-05-01 05:10:49 +00:00
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
2024-03-17 18:38:21 +00:00
|
|
|
|
2023-05-01 04:33:02 +00:00
|
|
|
steps:
|
2024-03-17 18:38:21 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-05-01 04:33:02 +00:00
|
|
|
with:
|
2024-03-17 18:38:21 +00:00
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: Select rust version
|
|
|
|
run: |
|
2024-03-17 20:51:52 +00:00
|
|
|
rustup toolchain install stable --profile minimal --no-self-update
|
|
|
|
rustup default stable
|
2024-03-17 18:38:21 +00:00
|
|
|
rustup target add wasm32-unknown-unknown
|
|
|
|
|
2023-05-01 06:11:52 +00:00
|
|
|
- uses: jetli/wasm-bindgen-action@v0.2.0
|
2024-03-17 18:58:02 +00:00
|
|
|
with:
|
2024-03-17 20:44:06 +00:00
|
|
|
# NOTE version here must match the emulator/frontends/pixels/Cargo.lock version
|
2024-03-17 18:58:02 +00:00
|
|
|
version: 0.2.92
|
2023-05-01 04:33:02 +00:00
|
|
|
|
2023-05-01 04:39:50 +00:00
|
|
|
- name: Install dependencies
|
2023-05-01 05:39:05 +00:00
|
|
|
run: |
|
|
|
|
sudo apt-get install -y alsa-base libasound2-dev libxkbcommon-dev
|
2024-03-17 20:51:52 +00:00
|
|
|
cargo install just
|
2023-05-01 05:39:05 +00:00
|
|
|
|
|
|
|
- name: Make build directory
|
|
|
|
run: mkdir build
|
|
|
|
|
|
|
|
- name: Build Pixels frontend
|
|
|
|
run: |
|
|
|
|
cd emulator/frontends/pixels
|
|
|
|
just build moa-genesis
|
2023-05-07 17:03:25 +00:00
|
|
|
cp -R dist/* ../../../build
|
2023-05-01 04:39:50 +00:00
|
|
|
|
2023-05-01 04:33:02 +00:00
|
|
|
- name: Build docs
|
2023-05-01 05:39:05 +00:00
|
|
|
run: |
|
|
|
|
cargo doc --document-private-items --workspace
|
2023-05-07 17:03:25 +00:00
|
|
|
cp -R target/doc build
|
2023-05-01 04:33:02 +00:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
|
|
|
with:
|
2023-05-01 06:19:01 +00:00
|
|
|
path: build
|
2023-05-01 04:33:02 +00:00
|
|
|
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
|
|
|
uses: actions/deploy-pages@v1
|