ci: previews to vercel #18
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 previews to vercel | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
admin-panel: | |
runs-on: ubuntu-latest | |
env: | |
VERCEL_ORG_ID: "team_6IvldowTmCOM7iNyRbdhmv8H" | |
VERCEL_PROJECT_ID: "prj_nfuHoWMSkaOEi2bOpTTwdLBvawkH" | |
steps: | |
- uses: actions/checkout@v4 | |
- run: npm install --global vercel@latest pnpm | |
- run: pnpm install --frozen-lockfile | |
- name: vercel magic | |
run: | | |
vercel env pull --token=${{ secrets.VERCEL_TOKEN }} | |
cp .env.local apps/admin-panel | |
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
vercel deploy --token=${{ secrets.VERCEL_TOKEN }} | |
customer-portal: | |
runs-on: ubuntu-latest | |
env: | |
VERCEL_ORG_ID: "team_6IvldowTmCOM7iNyRbdhmv8H" | |
VERCEL_PROJECT_ID: "prj_r4CylWukwHpyvoXOA3ZdLaCremoJ" | |
steps: | |
- uses: actions/checkout@v4 | |
- run: npm install --global vercel@latest pnpm | |
- run: pnpm install --frozen-lockfile | |
- name: set env | |
run: | | |
cat <<EOF > apps/customer-portal/.env | |
NEXT_PUBLIC_CORE_URL=https://app.staging.lana.galoy.io | |
NEXT_PUBLIC_KRATOS_PUBLIC_URL=https://app.staging.lana.galoy.io | |
EOF | |
- name: vercel magic | |
run: | | |
vercel env pull --token=${{ secrets.VERCEL_TOKEN }} | |
cp .env.local apps/customer-portal | |
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
vercel deploy --token=${{ secrets.VERCEL_TOKEN }} |