Skip to content

chore: frontend manual deploy #116

chore: frontend manual deploy

chore: frontend manual deploy #116

Workflow file for this run

name: Build Project
on:
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: Build the project
runs-on: ubuntu-latest
env:
NODE_ENV: test
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
MYSQL_PORT: 3306
DATABASE_URL: mysql://root:[email protected]:3306/test
ADMIN_PASSWORD: admin_password
CONVERTKIT_API_KEY: api_key
CONVERTKIT_FORM_ID: form_id
steps:
- uses: actions/checkout@v4
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/*.yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Set up Node 20
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Yarn 4
run: |
corepack enable
yarn set version berry
- name: Install projects dependencies
run: yarn install
- name: Lint the projects
run: yarn lint
- name: Build the projects
run: yarn build
- name: Start MySQL server
run: sudo systemctl start mysql.service
- name: Run tests
run: yarn test
preview-webapp:
name: Vercel Preview Deployment
runs-on: ubuntu-latest
needs:
- build
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
steps:
- uses: actions/checkout@v4
- name: Install Yarn 4
run: |
corepack enable
yarn set version berry
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}