From cf58d8933172e5a5806d5028c0ca50830b1c7564 Mon Sep 17 00:00:00 2001 From: Matt Karl Date: Wed, 10 Jan 2024 12:14:49 -0500 Subject: [PATCH 1/5] Test deploy --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e0e42b5..2f584d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,16 @@ on: branches: [ '**' ] pull_request: branches: [ '**' ] +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + packages: write + id-token: write +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false jobs: build: strategy: @@ -12,3 +22,24 @@ jobs: uses: ./.github/workflows/game-workflow.yml with: game: ${{ matrix.game }} + deploy: + if: github.ref_name == 'dev' + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Download Artifacts + uses: actions/download-artifact@v2 + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: '.' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + From e1024b7b3e80a3dc3cb1e6910bae79362923919f Mon Sep 17 00:00:00 2001 From: Matt Karl Date: Wed, 10 Jan 2024 13:33:15 -0500 Subject: [PATCH 2/5] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2f584d5..21f6abf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ on: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read - packages: write + pages: write id-token: write # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. From a5efed683eeb60d644f20e8544df9e5e81e97e25 Mon Sep 17 00:00:00 2001 From: Matt Karl Date: Wed, 10 Jan 2024 14:46:57 -0500 Subject: [PATCH 3/5] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 21f6abf..9f45913 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download Artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 - name: Setup Pages uses: actions/configure-pages@v4 - name: Upload artifact From 3fc49d9d3720437bb6201e92cbc6b7319aaac078 Mon Sep 17 00:00:00 2001 From: Matt Karl Date: Wed, 10 Jan 2024 14:53:10 -0500 Subject: [PATCH 4/5] Fix: use relative pathing --- README.md | 4 ++-- bubbo-bubbo/package.json | 2 +- puzzling-potions/vite.config.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d6dda5d..dbcc1a2 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ Below is a list of games that are currently available in this repository. Each g - Bubbo Bubbo - [Code](/bubbo-bubbo/README.md) - - [Play](https://bubbo-bubbo.netlify.app/) + - [Play](https://pixijs.io/open-games/bubbo-bubbo) - Puzzling Potions - [Code](/puzzling-potions/README.md) - - [Play](https://puzzling-potions.netlify.app/) + - [Play](https://pixijs.io/open-games/puzzling-potions) ## Tools diff --git a/bubbo-bubbo/package.json b/bubbo-bubbo/package.json index acd5dfa..ef2c5a6 100644 --- a/bubbo-bubbo/package.json +++ b/bubbo-bubbo/package.json @@ -12,7 +12,7 @@ "start": "vite --open", "clean": "rimraf dist/* public/* .assetpack/*", "prebuild": "run-s clean format:check lint assets types", - "build": "vite build", + "build": "vite build --base \"./\"", "assets": "assetpack", "prepreview": "run-s build", "preview": "vite preview --open", diff --git a/puzzling-potions/vite.config.js b/puzzling-potions/vite.config.js index a3f153c..f5d5d18 100644 --- a/puzzling-potions/vite.config.js +++ b/puzzling-potions/vite.config.js @@ -1,4 +1,5 @@ export default { + base: './', server: { host: true, port: 8000 From f317ad058b84ab3ed9206c3c05269118dc57674d Mon Sep 17 00:00:00 2001 From: Matt Karl Date: Wed, 10 Jan 2024 15:04:32 -0500 Subject: [PATCH 5/5] Use main-branch for deployment --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9f45913..6389839 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: with: game: ${{ matrix.game }} deploy: - if: github.ref_name == 'dev' + if: github.ref_name == 'main' needs: build environment: name: github-pages