Skip to content

add .env file to enable analytics #6

add .env file to enable analytics

add .env file to enable analytics #6

name: build 11ty site
on:
push:
branches: ["main"]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install dependencies & build
run: |
npm install
npm run build
- uses: actions/upload-pages-artifact@v2
- name: create env file
run: |
touch .env
echo NODE_ENV=${{ env.NODE_ENV }} >> .env
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- id: deployment
uses: actions/deploy-pages@v2
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}