Skip to content

Commit

Permalink
Pages Attempt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Marth1nus committed Sep 18, 2024
1 parent 71d7414 commit b2a6415
Showing 1 changed file with 22 additions and 39 deletions.
61 changes: 22 additions & 39 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy to GitHub Pages
name: Deploy to GitHub Pages

on:
push:
Expand All @@ -10,41 +10,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Emscripten
uses: docker://emscripten/emsdk:3.1.5

- name: Build with emcmake
run: |
mkdir build
cd build
emcmake cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$GITHUB_WORKSPACE/build_output ..
emmake make
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: build_output
path: build_output

deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Download build artifact
uses: actions/download-artifact@v2
with:
name: build_output
path: build_output

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build_output
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Emscripten
uses: mymindstorm/setup-emsdk@v14

- name: Run build script
run: |
mkdir build
pushd build
emcmake cmake ..
emmake make
mkdir ../output-html
mv *.html *.css *.js *.wasm *.mem ../output-html
popd
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output-html

0 comments on commit b2a6415

Please sign in to comment.