fix: Deploy stage to dev temporarily #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Dev | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - dev | |
| concurrency: | |
| group: dev | |
| cancel-in-progress: false | |
| jobs: | |
| deployToDev: | |
| 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@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| - 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="v${GITHUB_SHA:0:7}" | |
| echo "VITE_STUDIO_VERSION=$VERSION_TAG" >> $GITHUB_ENV | |
| - name: Build dev | |
| run: pnpm build:dev | |
| - name: Install HarperDB | |
| run: npm install -g [email protected] | |
| - name: Deploy to dev | |
| run: | | |
| mkdir deploy | |
| cp config.yaml deploy/ | |
| mv web deploy/ | |
| cd deploy | |
| echo "{}" > package.json | |
| CLI_TARGET_USERNAME=${{ secrets.CLI_TARGET_USERNAME }} CLI_TARGET_PASSWORD='${{ secrets.HARPERDB_CLI_TARGET_PASSWORD }}' harperdb deploy project='hdbms' target='${{ secrets.CLI_DEPLOY_TARGET }}' restart=true | |
| # CLI_TARGET_USERNAME=${{ secrets.CLI_TARGET_USERNAME_DEV }} CLI_TARGET_PASSWORD='${{ secrets.HARPERDB_CLI_TARGET_PASSWORD_DEV }}' harperdb deploy project='hdbms' target='${{ secrets.CLI_DEPLOY_TARGET_DEV }}' restart=true |