Merge pull request #24 from meddhiaka/fix #8
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: workflow on master | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{secrets.VERCEL_PROJECT_ID }} | |
# what if i commit modification on a readme file :) | |
# that is why i commented the push branches main sub tree ... | |
on: | |
push: | |
branches: | |
- main | |
#pull_request: | |
#types: [closed] | |
jobs: | |
DeployProduction: | |
# so it will run this workflow only new pull request is merged into main | |
# branch coming from another secondary branch ... | |
#if: github.event.pull_request.merged == true && github.event.base.ref == "main" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install vercel cli | |
run: npm install --global vercel | |
- name: pull vercel environment information | |
run: vercel pull --yes --environment=production --token=${{secrets.VERCEL_TOKEN}} | |
- name: build the app | |
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: deploy the app | |
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |