[monorepo] migrate to yarn v4, improve deployment process #6
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: Deploy website | |
env: | |
NODE_ENV: production | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
FILE_ID: zHeGLN45wIgf39kqdvKpoj | |
on: | |
push: | |
branches: [main] | |
paths: | |
- .github/workflows/deploy.yml | |
- packages/** | |
pull_request: | |
paths: | |
- .github/workflows/deploy.yml | |
- packages/** | |
jobs: | |
docs: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: 👀 Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: ⬢ Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: 🧶 Yarn install | |
run: yarn install --immutable | |
- name: 🚨 Lint code | |
run: yarn lint --max-warnings 0 | |
- name: 📦️ Build packages | |
env: | |
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }} | |
run: yarn build | |
- name: 🚀 Deploy website | |
uses: BetaHuhn/deploy-to-vercel-action@v1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.EXPO_BOT_GH_TOKEN }} | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
WORKING_DIRECTORY: packages/example-web |