Skip to content

Commit

Permalink
Add GitHub page
Browse files Browse the repository at this point in the history
  • Loading branch information
ioioioio committed Apr 21, 2024
1 parent 578ed08 commit a964a63
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy static content to Pages

on:
push:
branches: ["master"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build-wasm:
uses: ./.github/workflows/wasm.yml

deploy:
needs: build-wasm
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: wasm-build-artifacts
path: ./build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 7 additions & 1 deletion .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Wasm
on:
push:
pull_request:
workflow_call:

jobs:
build:
Expand All @@ -16,4 +17,9 @@ jobs:
mkdir build
cd build
emcmake cmake ..
emmake make
emmake make
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: wasm-build-artifacts
path: build

0 comments on commit a964a63

Please sign in to comment.