Skip to content

1.25.0

1.25.0 #149

Workflow file for this run

name: Deploy site to Github Pages
# Runs when pushing new tags
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_BASE_URL: "https://codeaid.github.io"
NEXT_PUBLIC_BASE_PATH: "/woth-toolbox"
NEXT_PUBLIC_GOOGLE_ANALYTICS: "G-3NG0GF80JK"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: yarn
- name: Setup Pages
uses: actions/configure-pages@v4
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Restore cache
uses: actions/cache@v4
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('yarn.lock') }}-
- name: Install dependencies
run: yarn install
- name: Validate code formatting
run: yarn prettier
- name: Perform code analysis
run: yarn lint
- name: Export static application assets
run: yarn build
- name: Upload assets as artifacts
uses: actions/upload-pages-artifact@v3
with:
path: ./out
# Deployment job
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4