Skip to content

Commit

Permalink
test a different theory
Browse files Browse the repository at this point in the history
  • Loading branch information
tjheffner committed Dec 21, 2023
1 parent 3865804 commit 8ec1529
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .tugboat/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ services:
# Install GitHub Status Updater, which updates the status of GitHub check runs.
- ./scripts/install_github_status_updater.sh

# Install & build vets-website early for next-build preview
# Build vets-website so assets are available (various widgets, fonts, etc)
- ./scripts/vets-web-setup.sh

# Commands that import files, databases, or other assets. When an
# existing preview is refreshed, the build workflow starts here,
# skipping the init step, because the results of that step will
Expand Down
5 changes: 4 additions & 1 deletion scripts/next-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ source ~/.bashrc
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
# APP_ENV=tugboat yarn dev

# Start the dev server. Vets-website assets need to be in place prior to this build.
APP_ENV=tugboat yarn start
27 changes: 27 additions & 0 deletions scripts/vets-web-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
source ~/.bashrc

# Installs & builds vets-website dependencies for next-build preview.
if [ ! -d docroot/vendor/va-gov/vets-website ]; then
git clone --single-branch --depth 1 https://github.com/department-of-veterans-affairs/vets-website.git docroot/vendor/va-gov/vets-website
else
echo "Repo vets-website already cloned."
fi

cd docroot/vendor/va-gov/vets-website

nvm use 14.15.1
npm install -g yarn

echo "Node $(node -v)"
echo "NPM $(npm -v)"
echo "Yarn $(yarn -v)"

export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=TRUE
yarn install
yarn build
10 changes: 5 additions & 5 deletions tugboat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ tasks:
cmds:
- drush va-gov-content-release:request:submit

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

build:
deps:
- build-storybook
- build-frontend
# - build-next
- build-next

default:
cmds:
Expand Down

0 comments on commit 8ec1529

Please sign in to comment.