Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/web-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
name: Deploy to Vercel
name: Deploy Web Application (Production)

on:
push:
branches:
- master
paths:
- "web/**"
pull_request:
branches:
- master
paths:
- "web/**"

workflow_dispatch:

Expand All @@ -20,7 +15,7 @@ env:

jobs:
deploy-app-web:
name: Run build
name: Deploy Production
runs-on: ubuntu-latest

steps:
Expand All @@ -42,10 +37,10 @@ jobs:
run: npm install --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
101 changes: 68 additions & 33 deletions .github/workflows/web-validation.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,73 @@
name: Web Validation

on:
pull_request:
branches:
- master
paths:
- "web/**"
workflow_dispatch:
pull_request:
branches:
- master
paths:
- "web/**"
workflow_dispatch:

jobs:
build-web:
name: Run build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml

- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: web

- name: Build project
run: pnpm run build
working-directory: web
build-web:
name: Run Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml

- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: web

- name: Build project
run: pnpm run build
working-directory: web

preview-deploy:
name: Run Vercel Preview Deploy
runs-on: ubuntu-latest
needs: build-web
if: github.event_name == 'pull_request'

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.11.1

- 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 --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel Preview
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --prod=false --yes
2 changes: 1 addition & 1 deletion web/src/pages/home-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function HomePage() {
loading="lazy"
/>
<span className="text-2xl font-bold text-blue-base md:text-center">
Brev.ly
Brev.ly teste
</span>
</div>

Expand Down