Skip to content

Commit

Permalink
Merge pull request #654 from shawnthompson/main
Browse files Browse the repository at this point in the history
add analytics to build for deploy
  • Loading branch information
shawnthompson authored Oct 25, 2024
2 parents 3e99f81 + a55934d commit 7ba7c62
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

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 @@ -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
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 7ba7c62

Please sign in to comment.