test app again #70
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 on Changes to Next.js Apps | |
on: | |
# pull_request: | |
# types: [opened, reopened] | |
push: | |
branches: | |
- main | |
paths: | |
- 'apps/app/**' | |
- 'apps/app/*' | |
- 'apps/landing/**' | |
- 'apps/landing/*' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Necessary for comparing changes to past commits | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
- name: Install TurboRepo CLI | |
run: pnpm i turbo --global | |
- name: Verify pnpm and turbo versions | |
run: | | |
pnpm --version | |
turbo --version | |
- name: Get changed packages | |
id: turborepoChanges | |
# uses: 94726/[email protected] | |
uses: 94726/action-turborepo-changes@2f392aee0d6b90803c0551ea774c254451fd92be | |
- name: Log changed package names | |
run: | | |
echo "Changed package names:" | |
echo '${{ fromJson(steps.turborepoChanges.outputs.package_names) }}' | tr ',' '\n' | |
- name: Deploy app to dev.domain.com | |
if: contains(fromJson(steps.turborepoChanges.outputs.package_names), 'app') | |
run: curl https://api.vercel.com/v1/integrations/deploy/prj_pIjgANGuuYB6DTezAaPiHYcBJerb/5PICX8gHCa | |
- name: Deploy landing to domain.com | |
if: contains(fromJson(steps.turborepoChanges.outputs.package_names), 'landing') | |
run: curl https://api.vercel.com/v1/integrations/deploy/prj_ZuS0TyO3wfg89YoINFUPuyqyTvl9/tMNpP6nB0Q |