add fallbacks env to local, improve file structure #15
Workflow file for this run
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: Frontend (Development Preview) | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_FRONTEND_DEV_ID }} | |
on: | |
push: | |
paths: | |
- 'frontend/**' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create env File | |
working-directory: ./frontend | |
run: | | |
touch .env | |
echo ENV=DEV >> .env | |
echo PORT=3001 >> .env | |
- name: Install Vercel CLI | |
working-directory: ./frontend | |
run: | | |
npm install --global vercel@canary | |
- name: Pull, Build & Deploy | |
working-directory: ./frontend | |
run: | | |
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |