Skip to content

Deploy Next.js site to Pages #5

Deploy Next.js site to Pages

Deploy Next.js site to Pages #5

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
schedule:
# Schedule to run every 24 hours at 00:00 UTC
- cron: '0 0 * * *'
workflow_dispatch: # Allows manual triggering of the workflow
permissions:
contents: read
pages: write
id-token: write
# prevents duplicate deployment requests
concurrency:
group: pages-deployment
cancel-in-progress: false
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out