Deploying NextJS Template for Release


Make sure you have nextjs-template cloned locally

cd /tmp
git clone
cd {WORKSPACE_ROOT}/packages/nextjs-template
mv /tmp/nextjs-template/.git .


These steps should be run after the weekly release has gone out. It is only needed to run these steps if we have changes to the nextjs-template

Deploy to dev branch

  1. Make sure your current workspace is clean and stash changes otherwise

  2. Get the release version (NOTE: this should be the release AFTER publishing the release. the lerna.json should be updated to the latest minor version at this point)

    git pull
    git checkout --track origin/$RELEASE_VERSION
    • eg: RELEASE_VERSION=release/0.81.0
  3. Update nextjs package

    • NOTE: we need to remove the workspace package.json to generate the lockfile correctly
    • #todo (Private): the following instructions are unix specific. we need to wrap this in a script that works also for windows
    rm package.json
    echo "sync nextjs-template..."
    VERSION=$(cat lerna.json | jq -r ".version")
    pushd packages/nextjs-template/
    echo "switch to dev branch..."
    git checkout --track -b origin/dev
    echo "backup node_modules..."
    mv node_modules /tmp
    echo "generating lockfile..."
    echo "commit..."
    git add .
    git commit -m "chore(release): sync nextjs-template with dendron $VERSION"

Verify dev branch

  1. Verify nextjs works in dev branch


  1. Push nextjs-template

    git push
    echo "restore node_modules..."
    mv node_modules /tmp/nextjs-nm
    mv /tmp/node_modules .
    echo "restore package.json"
    git checkout -- package.json
    echo "update nextjs commit to master"
    git add  "packages/nextjs-template/yarn.lock"
    git commit -m "chore: update nextjs lock file"
    git push


  1. Clone Remote

  2. Update the file and push

    vim vault/
    Last updated: 
    - version: {RELEASE_VERSION}
  3. Push

    git add . && git commit -m "bump version" && git push
  4. Go to

    • make sure deployment succeeds
    • click on "initialize or pull nextjs template"
      • make sure the commit matches the last commit in nextjs-template
  5. Go to and make sure - version: {RELEASE_VERSION} shows up

Pass it Forward Tass

  • automate the verification process

  1. From Commit