Skip to content

Commit 7ba7c62

Browse files
Merge pull request #654 from shawnthompson/main
add analytics to build for deploy
2 parents 3e99f81 + a55934d commit 7ba7c62

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/gh-pages.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ jobs:
1212
update-analytics:
1313
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
1414
runs-on: ubuntu-latest
15+
environment: github-pages # Specify the environment here
1516
steps:
1617
- uses: actions/checkout@v4
1718

1819
- name: Setup Node
19-
uses: actions/setup-node@v2.1.2
20+
uses: actions/setup-node@v4
2021
with:
2122
node-version: '20.x'
2223

@@ -33,6 +34,7 @@ jobs:
3334
deploy:
3435
if: github.event_name == 'push'
3536
runs-on: ubuntu-latest
37+
environment: github-pages # Specify the environment here
3638
steps:
3739
- uses: actions/checkout@v4
3840
with:
@@ -59,6 +61,11 @@ jobs:
5961
6062
- run: npm ci
6163
- run: npm run build
64+
env:
65+
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
66+
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
67+
GOOGLE_REFRESH_TOKEN: ${{ secrets.GOOGLE_REFRESH_TOKEN }}
68+
PROPERTY_ID: ${{ secrets.PROPERTY_ID }}
6269

6370
- name: Deploy
6471
uses: peaceiris/actions-gh-pages@v4

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"start-prod": "cross-env ELEVENTY_WATCH=true ELEVENTY_ENV=prod npm-run-all sass-start serve:port --parallel watch:*",
2222
"dev": "cross-env ELEVENTY_ENV=dev npm-run-all analytics sass-build --parallel eleventy",
2323
"debug": "DEBUG=Eleventy* npx @11ty/eleventy",
24-
"build": "npm-run-all sass-build eleventy"
24+
"build": "npm-run-all analytics sass-build eleventy"
2525
},
2626
"repository": {
2727
"type": "git",

0 commit comments

Comments
 (0)