fix: GitHub Pages

This commit is contained in:
2025-10-22 12:08:21 +07:00
parent e5949f66e6
commit df14c99ed5
2 changed files with 20 additions and 30 deletions

View File

@@ -1,28 +0,0 @@
name: Npm build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install
npm run build

View File

@@ -31,13 +31,31 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies and build
run: |
if [ -f package-lock.json ]; then
npm ci
else
npm install
fi
npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: "."
# Upload the built site
path: "./_site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4