From d8c4e2b3361fc481f35160a12d30686e90eacc5c Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 21 Feb 2024 09:26:51 -0500 Subject: [PATCH 1/2] Something is broken, build doesn't work --- config/fastboot.js | 24 ++++++++++++++++++++++++ package.json | 1 + 2 files changed, 25 insertions(+) create mode 100644 config/fastboot.js diff --git a/config/fastboot.js b/config/fastboot.js new file mode 100644 index 0000000..586e382 --- /dev/null +++ b/config/fastboot.js @@ -0,0 +1,24 @@ +/* global ReadableStream, WritableStream, TransformStream */ +module.exports = function () { + return { + buildSandboxGlobals(defaultGlobals) { + return Object.assign({}, defaultGlobals, { + fetch, + AbortController, + ReadableStream: + typeof ReadableStream !== 'undefined' + ? ReadableStream + : require('node:stream/web').ReadableStream, + WritableStream: + typeof WritableStream !== 'undefined' + ? WritableStream + : require('node:stream/web').WritableStream, + TransformStream: + typeof TransformStream !== 'undefined' + ? TransformStream + : require('node:stream/web').TransformStream, + Headers: typeof Headers !== 'undefined' ? Headers : undefined, + }); + }, + }; +}; diff --git a/package.json b/package.json index 0addf0b..7a269cf 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "test:ember": "ember test", "deploy": "ember build -e production && cp config/_redirects dist/" }, + "fastbootDependencies": ["crypto"], "devDependencies": { "@babel/core": "^7.23.6", "@ember/optional-features": "^2.0.0", From f98785324fe7baac1c1b09d1e7916de894d4e2c7 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 21 Feb 2024 09:29:24 -0500 Subject: [PATCH 2/2] workflow update --- .github/workflows/deploy.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d5e01dd..3d60b37 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,19 @@ env: TURBO_TOKEN: this-is-not-a-secret TURBO_TEAM: myself + + jobs: + can_build: + if: github.ref != 'refs/heads/main' || github.ref != 'refs/heads/master' + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: wyvox/action@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: pnpm build + DeployProduction: name: "Deploy: Production" if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'