Merge pull request #70 from eksqtr/development #5
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: Deploying to Production (Vercel.com) | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_TEAM_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- development | |
types: | |
- closed | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' || (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master') | |
steps: | |
- name: Checkout project source | |
- uses: actions/checkout@v | |
- name: Install Vercel CLI Latest | |
run: npm install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |