Skip to content

feat: Contact us over email too #33

feat: Contact us over email too

feat: Contact us over email too #33

Workflow file for this run

name: Deploy to Prod
on:
push:
branches:
- prod
concurrency:
group: prod
cancel-in-progress: false
jobs:
deployToProd:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
fetch-tags: true
- name: Set up pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Set up Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
cache: 'pnpm'
node-version-file: '.nvmrc'
- name: Disable Husky
run: echo "HUSKY=0" >> $GITHUB_ENV
- name: Install dependencies
run: pnpm install
- name: Run unit tests
run: pnpm test
- name: Run lint
run: pnpm lint
- name: Determine version tag for build
run: |
VERSION_TAG=$(git tag --points-at HEAD | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n1)
if [ -z "$VERSION_TAG" ]; then
VERSION_TAG="prod_${GITHUB_SHA:0:7}"
fi
echo "VITE_STUDIO_VERSION=$VERSION_TAG" >> $GITHUB_ENV
- name: Build prod
run: pnpm build:prod
- name: Deploy to prod
run: |
mkdir deploy
mv web deploy/
cp -R deploy-template/* deploy/
cd deploy
CLI_TARGET_USERNAME=${{ secrets.CLI_TARGET_USERNAME_PROD }} CLI_TARGET_PASSWORD='${{ secrets.HARPERDB_CLI_TARGET_PASSWORD_PROD }}' pnpm harperdb deploy_component project=hdbms target='${{ secrets.CLI_DEPLOY_TARGET_PROD }}' restart=false replicated=true