feat: github actions preview #3
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: Holahoon Preview | |
on: | |
push: | |
branches-ignore: | |
- main | |
env: | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
jobs: | |
Deploy-Preview: | |
runs-on: ubuntu-latest | |
environment: | |
name: preview | |
strategy: | |
matrix: | |
node-version: [18] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Pull Vercel Environment Information | |
run: yarn vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project | |
run: yarn vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project | |
run: yarn vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |