From a55934d68fc0afcebfd79392fb5de12136e38c2d Mon Sep 17 00:00:00 2001 From: Shawn Thompson Date: Fri, 25 Oct 2024 10:58:46 -0400 Subject: [PATCH] add analytics to build for deploy --- .github/workflows/gh-pages.yml | 9 ++++++++- package.json | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index a14f8fb7d..a00b78bb3 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -12,11 +12,12 @@ jobs: update-analytics: if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest + environment: github-pages # Specify the environment here steps: - uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v4 with: node-version: '20.x' @@ -33,6 +34,7 @@ jobs: deploy: if: github.event_name == 'push' runs-on: ubuntu-latest + environment: github-pages # Specify the environment here steps: - uses: actions/checkout@v4 with: @@ -59,6 +61,11 @@ jobs: - run: npm ci - run: npm run build + env: + GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} + GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} + GOOGLE_REFRESH_TOKEN: ${{ secrets.GOOGLE_REFRESH_TOKEN }} + PROPERTY_ID: ${{ secrets.PROPERTY_ID }} - name: Deploy uses: peaceiris/actions-gh-pages@v4 diff --git a/package.json b/package.json index f33d92332..3dc313223 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "start-prod": "cross-env ELEVENTY_WATCH=true ELEVENTY_ENV=prod npm-run-all sass-start serve:port --parallel watch:*", "dev": "cross-env ELEVENTY_ENV=dev npm-run-all analytics sass-build --parallel eleventy", "debug": "DEBUG=Eleventy* npx @11ty/eleventy", - "build": "npm-run-all sass-build eleventy" + "build": "npm-run-all analytics sass-build eleventy" }, "repository": { "type": "git",