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

Install and use the correct node version when starting Next Build. #20132

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,12 @@
],
"va:ds:drupal": [
"# Build the Drupal theme.",
"! ./scripts/should-run-directly.sh || (cd docroot/design-system && npm install && npm run build:drupal)",
"! ./scripts/should-run-directly.sh || (cd docroot/design-system && nvm use && npm install && npm run build:drupal)",
"./scripts/should-run-directly.sh || ddev composer va:ds:drupal --"
],
"va:ds:storybook": [
"# Build the Storybook.",
"! ./scripts/should-run-directly.sh || (cd docroot/design-system && npm install && npm run build:storybook)",
"! ./scripts/should-run-directly.sh || (cd docroot/design-system && nvm use && npm install && npm run build:storybook)",
"./scripts/should-run-directly.sh || ddev composer va:ds:storybook --"
],
"va:migrate:sync": [
Expand Down
5 changes: 4 additions & 1 deletion scripts/next-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ source ~/.bashrc

cd next

APP_ENV=tugboat yarn build:preview
# Install the correct node version if necessary and use it.
nvm install && nvm use

APP_ENV=tugboat yarn build:preview
3 changes: 3 additions & 0 deletions scripts/next-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ cd next
# Start the dev server. Vets-website assets will be available to the preview server after content-build builds them.
# APP_ENV=tugboat yarn dev

# Install the correct node version if necessary and use it.
nvm install && nvm use

# Start the dev server. Vets-website assets need to be in place prior to this build.
APP_ENV=tugboat yarn start
20 changes: 10 additions & 10 deletions tugboat.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
version: '3'
dotenv: ['.env']
dotenv: [ '.env' ]
output: 'group'

tasks:
build-storybook:
desc: Build storybook
cmds:
- composer va:ds:storybook
- composer va:ds:storybook

build-frontend:
desc: Request a frontend build
cmds:
- drush va-gov-content-release:request:submit
- drush va-gov-content-release:request:submit

build-next:
desc: build next.js preview server
start-next:
desc: start next.js preview server
cmds:
- composer va:next:build
- composer va:next:start

build:
deps:
- build-storybook
- build-frontend
- build-next
- build-storybook
- build-frontend
- start-next

default:
cmds:
- task: build
- task: build
Loading