Skip to content

change deployment workflow node version to 22 #2

change deployment workflow node version to 22

change deployment workflow node version to 22 #2

Workflow file for this run

name: Build and push to build branch
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
- name: Fix legacy OpenSSL error
run: export NODE_OPTIONS=--openssl-legacy-provider
- name: Install dependencies
run: npm ci
- name: Build production bundle
run: npm run build # or "webpack --mode=production" if no script
- name: Deploy to build branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./public
publish_branch: build
force_orphan: true # optional: cleans the branch history