Skip to content

Commit

Permalink
fix(ci): pipeline ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonsfran1165 committed Jan 17, 2025
1 parent 0109cb3 commit 82cb6f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 32 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,16 @@ jobs:
database: ${{ env.NEON_DATABASE_NAME }}
api_key: ${{ env.NEON_API_KEY }}

- name: verify auth-proxy turbo-ignore
# verify if auth-proxy has changed, if it has, we need to deploy it
run: |
# If the command exits with code 1, the build continues as normal
# If the command exits with code 0, the build is immediately aborted
check=$(npx turbo-ignore -d apps/auth-proxy) || true
# if check has Proceeding with deployment string, we need to deploy it use grep
if echo "$check" | grep -q "Proceeding with deployment"; then
echo "Proceeding with deployment, deploying auth-proxy"
echo "deploy_auth_proxy=true" >> $GITHUB_OUTPUT
else
echo "No changes detected in auth-proxy folder, skipping build"
echo "deploy_auth_proxy=false" >> $GITHUB_OUTPUT
fi
- name: Check for changes
id: turbo-ignore
continue-on-error: true
run: npx turbo-ignore -d apps/auth-proxy

- uses: amondnet/[email protected] #deploy
name: Deploy Unprice auth to Vercel
id: deploy-auth
if: ${{ steps.verify-auth-proxy.outputs.deploy_auth_proxy == 'true' }}
# if turbo-ignore fails,that means there are no changes in the auth-proxy folder
if: steps.turbo-ignore.outcome == 'failure'
with:
vercel-token: ${{ env.VERCEL_TOKEN }} # Required
vercel-org-id: ${{ env.VERCEL_ORG_ID}} #Required
Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,16 @@ jobs:
VERCEL_ENV: production
NODE_ENV: production

- name: verify auth-proxy turbo-ignore
# verify if auth-proxy has changed, if it has, we need to deploy it
run: |
# If the command exits with code 1, the build continues as normal
# If the command exits with code 0, the build is immediately aborted
check=$(npx turbo-ignore -d apps/auth-proxy) || true
# if check has Proceeding with deployment string, we need to deploy it use grep
if echo "$check" | grep -q "Proceeding with deployment"; then
echo "Proceeding with deployment, deploying auth-proxy"
echo "deploy_auth_proxy=true" >> $GITHUB_OUTPUT
else
echo "No changes detected in auth-proxy folder, skipping build"
echo "deploy_auth_proxy=false" >> $GITHUB_OUTPUT
fi
- name: Check for changes
id: turbo-ignore
continue-on-error: true
run: npx turbo-ignore -d apps/auth-proxy

- uses: amondnet/[email protected] #deploy
name: Deploy Unprice auth to Vercel
id: deploy-auth
if: ${{ steps.verify-auth-proxy.outputs.deploy_auth_proxy == 'true' }}
# if turbo-ignore fails,that means there are no changes in the auth-proxy folder
if: steps.turbo-ignore.outcome == 'failure'
with:
vercel-token: ${{ env.VERCEL_TOKEN }} # Required
vercel-org-id: ${{ env.VERCEL_ORG_ID}} #Required
Expand Down
1 change: 1 addition & 0 deletions apps/auth-proxy/routes/[...auth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default eventHandler((event) =>
name: p.login,
email: p.email,
image: p.avatar_url,
emailVerified: true,
}),
}),
],
Expand Down

0 comments on commit 82cb6f5

Please sign in to comment.