-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
251 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Build and Deploy Web Version | ||
|
||
on: | ||
push: | ||
branches: [ axis ] # Trigger on pushes to the `axis` branch | ||
pull_request: | ||
branches: [ axis ] # Trigger on PRs to the `axis` branch | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step 1: Checkout the repository | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' # Ensure submodules are checked out | ||
|
||
# Step 2: Set up Emscripten (for WASM compilation) | ||
- name: Set up Emscripten | ||
uses: mymindstorm/setup-emsdk@v12 | ||
with: | ||
version: '3.1.45' # Latest stable version of Emscripten | ||
|
||
# Step 3: Install xmake | ||
- name: Install xmake | ||
run: | | ||
wget https://xmake.io/shget.text -O - | bash | ||
source ~/.xmake/profile | ||
# Step 4: Build the project for WASM | ||
- name: Build for Web (WASM) | ||
run: | | ||
xmake f -p wasm -y | ||
xmake -y | ||
# Step 5: Prepare build artifacts for Netlify | ||
- name: Prepare artifacts | ||
run: | | ||
mkdir -p netlify-build | ||
cp -r build/clay/* netlify-build/ | ||
cp index.html netlify-build/ | ||
cp manifest.json netlify-build/ | ||
cp -r fonts netlify-build/ | ||
cp -r images netlify-build/ | ||
# Step 6: Deploy to Netlify | ||
- name: Deploy to Netlify | ||
uses: nwtgck/actions-netlify@v2 | ||
with: | ||
publish-dir: './netlify-build' # Directory containing the built files | ||
production-deploy: true # Deploy to production | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} # Netlify authentication token | ||
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }} # Netlify site ID | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.