Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove creation of empty .env files in workflows #3294

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/aksel-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ jobs:
- name: Install dependencies
run: yarn

- name: Create empty .env file (Can be removed when env-file-if-exists is implemented in node v22)
run: echo "" > ./aksel.nav.no/website/.env

- name: Build application
env:
SANITY_READ: ${{ secrets.SANITY_READ }}
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/aksel-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ jobs:
yarn boot
yarn docgen

- name: Create empty .env file (Can be removed when env-file-if-exists is implemented in node v22)
run: echo "" > ./aksel.nav.no/website/.env

- name: Update sanity sync
env:
SANITY_WRITE: ${{ secrets.SANITY_WRITE }}
Expand Down Expand Up @@ -71,9 +68,6 @@ jobs:
- name: Tests
run: yarn workspace website test

- name: Create empty .env file (Can be removed when env-file-if-exists is implemented in node v22)
run: echo "" > ./aksel.nav.no/website/.env

- name: Build application
env:
SANITY_READ: ${{ secrets.SANITY_READ }}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/backup-sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:
- name: Install dependencies
run: cd aksel.nav.no/website && yarn

- name: Create empty .env file (Can be removed when env-file-if-exists is implemented in node v22)
run: echo "" > ./aksel.nav.no/website/.env

- name: Export dataset
env:
SANITY_READ: ${{ secrets.SANITY_READ }}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ jobs:
run: |
yarn boot

- name: Create empty .env file (Can be removed when env-file-if-exists is implemented in node v22)
run: echo "" > ./aksel.nav.no/website/.env

- name: Build application
env:
SANITY_READ: ${{ secrets.SANITY_READ }}
Expand Down
16 changes: 8 additions & 8 deletions aksel.nav.no/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@
"cp:static": "copyfiles -E -u 1 '.next/static/**' .next/standalone/aksel.nav.no/website/.next/",
"cp:public": "copyfiles -E 'public/**' .next/standalone/aksel.nav.no/website/",
"cp:assets": "yarn cp:playroom && yarn cp:public && yarn cp:static",
"update:searchindex": "yarn tsx --env-file=.env ./scripts/create-index",
"update:searchindex": "yarn tsx --env-file-if-exists=.env ./scripts/create-index",
"e2e": "yarn build && yarn start-server-and-test 'yarn start' http://localhost:3000 'yarn playwright'",
"e2e:full": "yarn build && yarn generate-testpaths && FULL_TEST=true yarn start-server-and-test start http://localhost:3000 playwright",
"e2e:ci-full": "yarn generate-testpaths && FULL_TEST=true yarn start-server-and-test start http://localhost:3000 playwright",
"update:rss": "yarn tsx --env-file=.env ./scripts/generate-rss-feed",
"update:props": "yarn tsx --env-file=.env ./scripts/update-props",
"update:tokens": "yarn tsx --env-file=.env ./scripts/update-tokens",
"update:eksempler": "yarn tsx --env-file=.env ./scripts/update-examples/update-sanity",
"update:rss": "yarn tsx --env-file-if-exists=.env ./scripts/generate-rss-feed",
"update:props": "yarn tsx --env-file-if-exists=.env ./scripts/update-props",
"update:tokens": "yarn tsx --env-file-if-exists=.env ./scripts/update-tokens",
"update:eksempler": "yarn tsx --env-file-if-exists=.env ./scripts/update-examples/update-sanity",
"validate:eksempler": "yarn tsx ./scripts/update-examples/validate",
"update:changelog": "yarn tsx --env-file=.env ./scripts/changelog",
"update:changelog": "yarn tsx --env-file-if-exists=.env ./scripts/changelog",
"update:sanity": "yarn update:tokens && yarn update:props && yarn update:eksempler && yarn update:changelog",
"analyze": "cross-env ANALYZE=true yarn build",
"test": "vitest run -c config/vitest.config.ts",
"test:watch": "vitest watch -c config/vitest.config.ts",
"playwright": "playwright test",
"backup": "yarn tsx --env-file=.env scripts/backup.ts",
"generate-testpaths": "yarn tsx --env-file=.env ./scripts/generate-testpaths.ts",
"backup": "yarn tsx --env-file-if-exists=.env scripts/backup.ts",
"generate-testpaths": "yarn tsx --env-file-if-exists=.env ./scripts/generate-testpaths.ts",
"watch:tw": "yarn tailwindcss -i ./components/styles/index.css -o ./dist/tw.css --watch"
},
"dependencies": {
Expand Down