fix(deps): update minor and patch dependencies #344
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: Release | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
NODE_VERSION: 18 | |
NODE_CACHE: "yarn" | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3.6.0 | |
- name: Setup Node | |
uses: actions/setup-node@v3.8.2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: ${{ env.NODE_CACHE }} | |
- name: Restore NextJs cache | |
uses: actions/cache@v3.3.3 | |
with: | |
path: ${{ github.workspace }}/.next/cache | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.[jt]s', '**/*.[jt]sx') }} | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build application | |
run: yarn build | |
- name: Cache NextJs build | |
uses: actions/cache@v3.3.3 | |
with: | |
path: ${{ github.workspace }}/.next | |
key: ${{ github.ref }}-${{ github.sha }} | |
test: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3.6.0 | |
- name: Setup Node | |
uses: actions/setup-node@v3.8.2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: ${{ env.NODE_CACHE }} | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Check types | |
run: yarn type-check | |
- name: Check eslint | |
run: yarn lint | |
- name: Check prettier | |
run: yarn prettify | |
deploy: | |
needs: test | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3.6.0 | |
- name: Setup Node | |
uses: actions/setup-node@v3.8.2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: ${{ env.NODE_CACHE }} | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Restore cached NextJs build | |
uses: actions/cache@v3.3.3 | |
with: | |
path: ${{ github.workspace }}/.next | |
key: ${{ github.ref }}-${{ github.sha }} | |
- name: Setup environment variables | |
run: yarn vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Prepare Vercel build | |
run: yarn vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy NextJs application | |
run: yarn deploy --prod --token=${{ secrets.VERCEL_TOKEN }} |