Skip to content

ci: remove duplicated pnpm cache step #41

ci: remove duplicated pnpm cache step

ci: remove duplicated pnpm cache step #41

name: Deploy non-production
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy-preview:
name: Deploy preview
runs-on: ubuntu-latest
if: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release-please') }}
environment:
name: url
url: ${{ steps.deploy.outputs.url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check changed files
id: check-changed-files
uses: ./.github/workflows/actions/get-changed-files
- name: Deploy to vercel
if: ${{ steps.check-changed-files.outputs.any_changed == 'true' }}
id: deploy-preview
uses: ./.github/workflows/actions/deploy
with:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
TARGET_ENVIRONMENT: preview
deploy-staging:
name: Deploy staging
runs-on: ubuntu-latest
environment:
name: preview
url: ${{ steps.deploy.outputs.url }}
if: ${{ github.ref_name == 'main' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy
id: deploy-staging
uses: ./.github/workflows/actions/deploy
with:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
TARGET_ENVIRONMENT: staging