Add variants #145
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 to production | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy-web: | |
name: π Deploy web to Cloudflare | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v4 | |
- name: π¦ Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: π’ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
cache-dependency-path: ./pnpm-lock.yaml | |
- name: π¦ Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: π Run migrations | |
run: pnpm --filter=www run db:migrate --remote | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
- name: π Deploy web | |
run: pnpm --filter=www run deploy | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
deploy-sanity: | |
name: π Deploy CMS to Sanity | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v4 | |
- name: π¦ Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: π’ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
cache-dependency-path: ./pnpm-lock.yaml | |
- name: π¦ Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: π Deploy CMS | |
run: pnpm --filter=cms run deploy | |
env: | |
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }} |