Skip to content
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: 2 additions & 1 deletion .devcontainer/frontend/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"workspaceFolder": "/workspaces/graphql-platform/website",
"postCreateCommand": "yarn install --immutable && yarn playwright install chromium",
"containerEnv": {
"NEXT_TELEMETRY_DISABLED": "1"
"NEXT_TELEMETRY_DISABLED": "1",
"CHILLICREAM_FRONTEND_ENV": "devcontainer"
},
"customizations": {
"vscode": {
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ jobs:
- name: Install Packages
run: yarn --immutable --network-timeout 100000
working-directory: website
env:
CHILLICREAM_FRONTEND_ENV: ci
Comment on lines 141 to +145

- name: Install Playwright Chromium
run: yarn playwright install --with-deps chromium
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
- name: Install Packages
run: yarn --immutable --network-timeout 100000
working-directory: website
env:
CHILLICREAM_FRONTEND_ENV: ci
Comment on lines 48 to +52

- name: Install Playwright Chromium
run: yarn playwright install --with-deps chromium
Expand Down
16 changes: 16 additions & 0 deletions website/.yarn/plugins/enforce-devcontainer.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
name: `plugin-enforce-devcontainer`,
factory: () => ({
hooks: {
validateProject(project, report) {
if (!process.env.CHILLICREAM_FRONTEND_ENV) {
report.reportError(
0,
`yarn install is only allowed inside the frontend devcontainer or CI. ` +
`Open the "ChilliCream Frontend" devcontainer for development on the website.`,
);
Comment on lines +7 to +11
}
},
},
}),
};
3 changes: 3 additions & 0 deletions website/.yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ enableScripts: false

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/enforce-devcontainer.cjs

# 7 days (in minutes)
npmMinimalAgeGate: 10080

Expand Down
Loading