Skip to content

Commit

Permalink
Add .env file creation step in GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnthompson committed Jan 28, 2025
1 parent 90623c7 commit 0317ab3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
publish_branch: gh-pages

update-analytics:
if: github.event_name == 'schedule'
# if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: write # Ensure GitHub Actions can push to the repository
Expand Down Expand Up @@ -83,13 +83,15 @@ jobs:
- run: npm ci

- name: Create .env File
run: |
echo GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }} >> .env
echo GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_CLIENT_SECRET }} >> .env
echo GOOGLE_REFRESH_TOKEN=${{ secrets.GOOGLE_REFRESH_TOKEN }} >> .env
echo PROPERTY_ID=${{ secrets.PROPERTY_ID }} >> .env
- name: Run analytics update
run: npm run analytics
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: Build site
run: npm run build
Expand Down

0 comments on commit 0317ab3

Please sign in to comment.