Skip to content

Build and Deploy to GitHub Pages #2990

Build and Deploy to GitHub Pages

Build and Deploy to GitHub Pages #2990

name: Build and Deploy to GitHub Pages
on:
schedule:
- cron: '0 * * * *' # Runs at the start of every hour
push:
branches:
- prod # Trigger the workflow on pushes to the prod branch
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install Dependencies
run: npm ci
- name: Run Build
run: npm run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs # The folder generated by your build process
user_name: 'github-actions[bot]' # user name to show in commit log
user_email: 'github-actions[bot]@users.noreply.github.com'