Skip to content

Merge branch 'f/device-identification' into next #50

Merge branch 'f/device-identification' into next

Merge branch 'f/device-identification' into next #50

name: Staging Deploy
on:
workflow_dispatch:
push:
branches:
- next
paths:
- "server/**/*.*"
- "src/**/*.*"
- "lib/**/*.*"
- "netlify.toml"
jobs:
build_and_deploy:
name: Build and deploy to Netlify
runs-on: ubuntu-22.04
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
DATABASE_URL: ${{ secrets.STAGING_DB }}
SYSTEM_WALLET: ${{ secrets.STAGING_SYSTEM_WALLET }}
SYSTEM_STARTING_BALANCE: ${{ vars.STAGING_SYSTEM_STARTING_BALANCE }}
ORIGIN: ${{ vars.STAGING_ORIGIN }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: package.json
- name: Install PNPM
run: npm install -g pnpm
- name: Get Store Path
id: get-store-path
run: echo "store-path=$(pnpm store path)\n" >> $GITHUB_OUTPUT
- name: Setup Cache
id: setup-cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-${{ hashFiles('**/*lock*', 'package.json') }}
restore-keys: |
${{ runner.os }}-${{ hashFiles('**/*lock*', 'package.json') }}
${{ runner.os }}-
path: |
node_modules
${{ steps.get-store-path.outputs.store-path }}
.netlify
- name: Install Dependencies 📦
if: steps.setup-cache.outputs.cache-hit != 'true'
run: pnpm i
# - name: Migrate Database Schema
# run: pnpm migrate.staging
- name: Build ⚙️ & Deploy ⬆️
run: netlify deploy --alias="staging" --build --context branch-deploy --message="${{ github.event.head_commit.message }}"