Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci/GitHub #2

Merged
merged 3 commits into from
Mar 1, 2024
Merged
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
32 changes: 16 additions & 16 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,66 @@ run-name: 'deploy: ${{ github.sha }}'
on:
workflow_dispatch:
inputs:
auth_service:
auth_svc:
type: boolean
required: true
default: false
description: Auth service
user_service:
users_svc:
type: boolean
required: true
default: false
description: User service
post_service:
description: Users service
posts_svc:
type: boolean
required: true
default: false
description: Post service
description: Posts service
environment:
type: choice
description: Which server environment would you like to deploy?
options:
- staging
- production
jobs:
deploy-auth-service:
if: inputs.auth_service == true && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
deploy-auth-svc:
if: inputs.auth_svc == true && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
uses: ./.github/workflows/wc-deploy-schema.yml
with:
environment: ${{ inputs.environment }}
pre_built: true
pre_built_cmd: |
pnpm i
npx nx build @pinpin/auth-service
npx nx build @pinpin/auth-svc
secrets:
org_id: ${{ secrets.VERCEL_ORG_ID }}
project_id: ${{ secrets.VERCEL_AUTH_SERVICE_ID }}
token: ${{ secrets.VERCEL_TOKEN }}

deploy-user-service:
if: inputs.user_service == true && (github.ref == 'refs/heads/staging' || github.refs == 'refs/heads/main')
deploy-users-svc:
if: inputs.users_svc == true && (github.ref == 'refs/heads/staging' || github.refs == 'refs/heads/main')
uses: ./.github/workflows/wc-deploy-schema.yml
with:
environment: ${{ inputs.environment }}
pre_built: true
pre_built_cmd: |
pnpm i
npx nx build @pinpin/user-service
npx nx build @pinpin/users-svc
secrets:
org_id: ${{ secrets.VERCEL_ORG_ID }}
project_id: ${{ secrets.VERCEL_USER_SERVICE_ID }}
project_id: ${{ secrets.VERCEL_USERS_SERVICE_ID }}
token: ${{ secrets.VERCEL_TOKEN }}

deploy-post-service:
if: inputs.post_service == true && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
deploy-posts-svc:
if: inputs.posts_svc == true && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
uses: ./.github/workflows/wc-deploy-schema.yml
with:
environment: ${{ inputs.environment }}
pre_built: true
pre_built_cmd: |
pnpm i
npx nx build @pinpin/post-service
npx nx build @pinpin/posts-svc
secrets:
org_id: ${{ secrets.VERCEL_ORG_ID }}
project_id: ${{ secrets.VERCEL_POST_SERVICE_ID }}
project_id: ${{ secrets.VERCEL_POSTS_SERVICE_ID }}
token: ${{ secrets.VERCEL_TOKEN }}
Loading