Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

chore(deps): bump next from 13.4.5 to 14.2.3 #721

chore(deps): bump next from 13.4.5 to 14.2.3

chore(deps): bump next from 13.4.5 to 14.2.3 #721

Workflow file for this run

name: Verify, Build, & Deploy
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
install:
name: Install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache Node Modules
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
# Any way to encapsulate all of this with cache-hit?
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: Install Packages
run: npm ci --ignore-scripts
lint:
name: Lint
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Cache Node Modules
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Linting
run: npm run lint
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Cache Node Modules
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Coverage
run: npm run test:coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
build:
name: Build
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v2
- name: Cache Node Modules
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Cache NextJS
id: cache-nextjs
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Build
run: npm run build
semantic:
name: Semantic Release
runs-on: ubuntu-latest
needs: [lint, coverage, build]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
outputs:
published: ${{ steps.semantic.outputs.new_release_published }}
major: ${{ steps.semantic.outputs.new_release_major_version }}
minor: ${{ steps.semantic.outputs.new_release_minor_version }}
patch: ${{ steps.semantic.outputs.new_release_patch_version }}
steps:
- uses: actions/checkout@v2
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-docker:
name: Deploy (Docker)
runs-on: ubuntu-latest
needs: semantic
if: needs.semantic.outputs.published == 'true'
steps:
- uses: actions/checkout@v2
- name: Cache Node Modules
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Cache NextJS
id: cache-nextjs
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/ribbon-studios/silvy
tags: |
type=raw,value=${{ needs.semantic.outputs.major }}
type=raw,value=${{ needs.semantic.outputs.major }}.${{ needs.semantic.outputs.minor }}
type=raw,value=${{ needs.semantic.outputs.major }}.${{ needs.semantic.outputs.minor }}.${{ needs.semantic.outputs.patch }}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy-netlify:
name: Deploy (Netlify)
runs-on: ubuntu-latest
needs: semantic
if: needs.semantic.outputs.published == 'true'
steps:
- uses: actions/checkout@v2
- name: Cache Node Modules
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Cache NextJS
id: cache-nextjs
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Deploy Database
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: npm run deploy:database
- name: Deploy to Netlify
run: curl -X POST ${{ secrets.DEPLOY_URL }}