Skip to content

Bump the rehype group with 2 updates (#234) #149

Bump the rehype group with 2 updates (#234)

Bump the rehype group with 2 updates (#234) #149

on:
push:
branches:
- main
workflow_dispatch: {}
name: Publish to GitHub Pages
jobs:
deploy_ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: main
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: 'main/package-lock.json'
- name: Install dependencies
run: |
cd main
npm ci
- name: Build
run: |
cd main
NODE_ENV=production npm run build
- uses: actions/checkout@v4
with:
ref: gh-pages
path: pages
- name: Commit Build to gh-pages
run: |
cp -R main/dist/* pages/
cd pages
HAS_CHANGES=$(git diff)
if [ -n "$HAS_CHANGES" ]; then
git config user.name 'GH Actions Bot'
git config user.email 'actions.bot@example.com'
git add .
git commit -m 'Update gh-pages site code from main branch'
git push
fi