Skip to content

Commit

Permalink
ci: add deploy domain target url
Browse files Browse the repository at this point in the history
closes #3
  • Loading branch information
0-vortex committed Dec 19, 2023
1 parent 41589ac commit c8cb3a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ jobs:
runs-on: ubuntu-latest
outputs:
DEPLOY_ENVIRONMENT: ${{ steps.env.outputs.DEPLOY_ENVIRONMENT }}
DEPLOY_DOMAIN: ${{ steps.env.outputs.DEPLOY_DOMAIN }}
VERCEL_ENVIRONMENT: ${{ steps.env.outputs.VERCEL_ENVIRONMENT }}
VERCEL_COMMAND: ${{ steps.env.outputs.VERCEL_COMMAND }}
steps:
- name: "☁️ compute environment variables"
id: env
run: |
echo "DEPLOY_ENVIRONMENT=$([[ ${{ github.ref_name }} == 'main' ]] && echo 'production' || echo ${{ github.ref_name }})" >> $GITHUB_OUTPUT
echo "DEPLOY_DOMAIN=$([[ ${{ github.ref_name }} == 'main' ]] && echo 'tmcb.space' || echo "${{ github.ref_name }}.tmcb.space")" >> $GITHUB_OUTPUT
echo "VERCEL_ENVIRONMENT=$([[ ${{ github.ref_name }} == 'main' ]] && echo 'production' || echo 'preview')" >> $GITHUB_OUTPUT
echo "VERCEL_COMMAND=$([[ ${{ github.ref_name }} == 'main' ]] && echo "--prod" || echo '')" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -70,6 +72,7 @@ jobs:
deploy:
environment:
name: ${{ needs.setup.outputs.DEPLOY_ENVIRONMENT }}
url: https://${{ needs.setup.outputs.DEPLOY_DOMAIN }}
name: Deploy to Vercel
needs:
- setup
Expand Down

0 comments on commit c8cb3a8

Please sign in to comment.