refactory(workspace): renamed some packages for clarity #1504
Workflow file for this run
This file contains 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 | |
env: | |
TELEGRAM_API_TOKEN: ${{ secrets.TELEGRAM_API_TOKEN }} | |
on: | |
pull_request: | |
branches: ["master"] | |
paths: | |
- "apps/blog/**" | |
- "apps/dashboard/**" | |
- "apps/landing/**" | |
- "apps/web/**" | |
- "packages/ui/**" | |
- "packages/atlas/**" | |
- "packages/headless/**" | |
- "packages/utils/**" | |
- "packages/types/**" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20.11.1" | |
- name: Enable pnpm | |
run: corepack enable pnpm | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build packages | |
run: pnpm build:pkgs | |
# Web platform Deployment | |
- name: Pull Web platform from Vercel | |
run: pnpm vercel:ci pull "web" "apps/web/" --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Setup staging environment variables for Web platform | |
run: cp apps/web/.env.staging apps/web/.env | |
- name: Build Web platform using Vercel | |
run: pnpm build:web:vercel | |
- name: Deploy Web platform to Vercel | |
run: pnpm deploy:web:vercel --token=${{ secrets.VERCEL_TOKEN }} | |
# UI package Deployment | |
- name: Pull UI from Vercel | |
run: pnpm vercel:ci pull "ui" "packages/ui/" --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Setup staging environment variables for web | |
run: cp packages/ui/.env.staging packages/ui/.env | |
- name: Build UI using Vercel | |
run: pnpm build:ui:vercel | |
- name: Deploy UI to Vercel | |
run: pnpm deploy:ui:vercel --token=${{ secrets.VERCEL_TOKEN }} | |
# Landing Deployment | |
- name: Pull Landing from Vercel | |
run: pnpm vercel:ci pull "landing" "apps/landing/" --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Landing using Vercel | |
run: pnpm build:landing:vercel | |
- name: Deploy Landing to Vercel | |
run: pnpm deploy:landing:vercel --token=${{ secrets.VERCEL_TOKEN }} | |
# Dashboard Deployment | |
- name: Pull Dashboard from Vercel | |
run: pnpm vercel:ci pull "dashboard" "apps/dashboard/" --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Setup staging environment variables for Dashboard | |
run: cp apps/dashboard/.env.staging apps/dashboard/.env | |
- name: Build Dashboard using Vercel | |
run: pnpm build:dashboard:vercel | |
- name: Deploy Dashboard to Vercel | |
run: pnpm deploy:dashboard:vercel --token=${{ secrets.VERCEL_TOKEN }} | |
# Display deployment URLs as GitHub comment and Telegram message | |
- name: Pull latest deployment urls from Vercel | |
run: pnpm vercel:ci urls "web,ui,landing,dashboard" --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Send latest deployment urls to Telegram | |
run: pnpm telegram send-vercel-urls -p ${{ github.event.number }} -b ${{ github.head_ref }} | |
- name: Make GitHub comment with Vercel URLs | |
run: pnpm github comment -p ${{ github.event.number }} -t ${{ secrets.AUTH_GITHUB_TOKEN }} |