Update copy path in page-release workflow #16
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
name: Build and Push Wasm Assets | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: [published] | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest # Adjust OS if needed | |
steps: | |
- uses: actions/checkout@v4 # Checkout the source code | |
- name: Run Gradle Build | |
run: ./gradlew :launchpad:wasmJsBrowserProductionWebpack | |
- name: Extract Wasm Assets | |
run: | | |
# Assuming launchpad/build/dist/wasmJs/productionExecutable exists after build | |
mkdir -p ./wasmJs # Create a folder to store extracted assets locally | |
cp -r launchpad/build/dist/wasmJs/productionExecutable/* ./wasmJs/ | |
cp -r commonCompose/build/processedResources/wasmJs/main/values/* ./wasmJs/values/ | |
- name: Checkout Destination Repo (shallow clone) | |
uses: actions/checkout@v4 # Checkout the destination repository (shallow clone) | |
with: | |
repository: mdsadique-inam/launchpad | |
token: ${{ secrets.PUSH_TOKEN }} # Use a secret for access token | |
fetch-depth: 1 # Only download the latest commit for efficiency | |
path: launchpad | |
- name: Push Wasm Assets to /docs | |
working-directory: ./launchpad | |
run: | | |
git config user.name "md sadique inam" # Replace with your name | |
git config user.email "[email protected]" # Replace with your email | |
mv ../wasmJs/* ./docs/ # Move extracted assets to /docs folder | |
git add docs/ # Add the /docs folder to Git | |
git commit -m "Update Wasm assets from build" | |
git push | |