Skip to content

Instantly share code, notes, and snippets.

@kuncevic
Created June 7, 2022 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuncevic/3dcccd73833f1027034dd07a0ebc6433 to your computer and use it in GitHub Desktop.
Save kuncevic/3dcccd73833f1027034dd07a0ebc6433 to your computer and use it in GitHub Desktop.
name: Deploy Monorepo
on:
push:
path: projects/app1
branches: [master, staging]
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
cd monorepo
npm ci
npm run prerender:a
deploy:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Deploy to Vercel Action
uses: BetaHuhn/deploy-to-vercel-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
ALIAS_DOMAINS: |
example.com
{BRANCH}.example.com
PR_PREVIEW_DOMAIN: "{REPO}-{PR}.now.sh"
WORKING_DIRECTORY: monorepo/dist/app1/browser
on:
push:
path: projects/app2
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment