diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index cfc3cb6..f1a2717 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -26,7 +26,7 @@ jobs: # Generate the routes for prerendering. This is the only way I found to pass # environment variables to the executor. - run: VM_CONTENTFUL_SPACE=${{ env.VM_CONTENTFUL_SPACE }} VM_CONTENTFUL_ACCESS_TOKEN=${{ env.VM_CONTENTFUL_ACCESS_TOKEN }} VM_CONTENTFUL_ENVIRONMENT=${{ env.VM_CONTENTFUL_ENVIRONMENT }} yarn nx run website:build-routes - - run: npx nx run website:prerender + - run: npx nx run website:prerender:${{ env.VM_CONTENTFUL_ENVIRONMENT }} - name: Archive artifacts uses: actions/upload-artifact@v4 @@ -98,4 +98,3 @@ jobs: channelId: live projectId: ${{ secrets.FIREBASE_PROJECT_ID }} target: ${{ secrets.FIREBASE_SITE_TARGET }} - diff --git a/apps/website/project.json b/apps/website/project.json index 935ae1d..2cb61b0 100644 --- a/apps/website/project.json +++ b/apps/website/project.json @@ -30,6 +30,22 @@ }, "configurations": { "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all", + "index": "apps/website/src/index.prod.html" + }, + "staging": { "budgets": [ { "type": "initial", @@ -96,6 +112,9 @@ "production": { "outputHashing": "media" }, + "staging": { + "outputHashing": "media" + }, "development": { "buildOptimizer": false, "optimization": false, @@ -134,6 +153,10 @@ "production": { "browserTarget": "website:build:production", "serverTarget": "website:server:production" + }, + "staging": { + "browserTarget": "website:build:staging", + "serverTarget": "website:server:staging" } }, "defaultConfiguration": "production" diff --git a/apps/website/src/index.prod.html b/apps/website/src/index.prod.html new file mode 100644 index 0000000..d2c2361 --- /dev/null +++ b/apps/website/src/index.prod.html @@ -0,0 +1,39 @@ + + +
+ +