Merge pull request #29 from amrmelsayed/refactoring #4
This file contains hidden or 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: Staging Deployment | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| environment: staging | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| steps: | |
| - name: π Setup repo | |
| uses: actions/checkout@v3 | |
| - name: π Setup Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20.x | |
| cache: yarn | |
| - name: π¦ Install Vercel CLI | |
| run: npm install --global vercel@latest | |
| - name: π¦ Install dependencies | |
| run: yarn install | |
| - name: π Setup EAS | |
| uses: expo/expo-github-action@v8 | |
| with: | |
| eas-version: latest | |
| token: ${{ secrets.EXPO_TOKEN }} | |
| - name: Pull Vercel Environment Information | |
| run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: π Pull in environment variables | |
| run: eas env:pull preview | |
| - name: π Build | |
| run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: π Deploy to Vercel | |
| run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |