feat: use cpm #13
Workflow file for this run
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: Deploy Game | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: "_deps" | |
| key: deps-${{ runner.os }} | |
| - uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: 4.0.6 | |
| actions-cache-folder: "emsdk-cache" | |
| - name: Download ports | |
| run: | | |
| embuilder build harfbuzz | |
| - name: Run CMake | |
| run: emcmake cmake -G "Unix Makefiles" . | |
| - name: Make | |
| run: emmake make -j4 | |
| - uses: actions/upload-pages-artifact@v3 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| path: ./build | |
| - name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/main' | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| - name: Deploy to A.D.S. Games | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: adsgames/[email protected] | |
| with: | |
| project-id: memory | |
| build-dir: ./build/ | |
| platform: WEB | |
| bucket-access-key: ${{ secrets.LINODE_BUCKET_ACCESS_KEY }} | |
| bucket-secret-key: ${{ secrets.LINODE_BUCKET_SECRET_KEY }} | |
| api-key: ${{ secrets.ADSGAMES_API_KEY }} |