Skip to content

Commit

Permalink
fix: disable remote storage within CF Pages CI
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Apr 15, 2024
1 parent a194392 commit 02f65e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ export default defineNuxtModule<ModuleOptions>({

// Within CF Pages CI/CD to notice NuxtHub about the build and hub config
if (!nuxt.options.dev && process.env.CF_PAGES && process.env.NUXT_HUB_PROJECT_DEPLOY_TOKEN && process.env.NUXT_HUB_PROJECT_KEY && process.env.NUXT_HUB_ENV) {
// Disable remote option (if set also for prod)
hub.remote = false
// Wait for modules to be done to send config to NuxtHub
nuxt.hook('modules:done', async () => {
const { bindingsChanged } = await $fetch<{ bindingsChanged: boolean }>(`/api/projects/${process.env.NUXT_HUB_PROJECT_KEY}/build/${process.env.NUXT_HUB_ENV}/before`, {
baseURL: hub.url,
Expand Down

0 comments on commit 02f65e5

Please sign in to comment.