Skip to content

Commit

Permalink
add analytics to build for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnthompson committed Oct 25, 2024
1 parent 9473161 commit 97718ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ 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

Expand All @@ -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:
Expand All @@ -58,6 +60,11 @@ jobs:
${{ runner.os }}-node-
- run: npm ci
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 }}
- run: npm run build

- name: Deploy
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 97718ad

Please sign in to comment.