Simplify: clone rayforce directly, no copying #10
This file contains hidden or 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 Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout rayforce-wasm | |
| uses: actions/checkout@v4 | |
| - name: Clone rayforce | |
| run: | | |
| git clone --depth 1 https://github.com/RayforceDB/rayforce.git src/rayforce-repo | |
| echo "Rayforce commit: $(cd src/rayforce-repo && git rev-parse --short HEAD)" | |
| - name: Setup Emscripten | |
| uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: 'latest' | |
| - name: Build WASM | |
| run: RAYFORCE_SRC_DIR=src/rayforce-repo make wasm | |
| - name: Prepare deployment | |
| run: | | |
| mkdir -p _site | |
| cp dist/rayforce.js _site/ | |
| cp dist/rayforce.wasm _site/ | |
| cp examples/index.html _site/ | |
| cp examples/favicon.ico _site/ | |
| cp -r examples/assets _site/ | |
| sed -i 's|../dist/rayforce.js|./rayforce.js|g' _site/index.html | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |