34 lines
767 B
YAML
34 lines
767 B
YAML
name: Build Docusaurus Site
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest:host
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
run: |
|
|
git clone "http://172.17.0.1:3000/${{ github.repository }}.git" .
|
|
git checkout "${{ github.sha }}"
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build Docusaurus
|
|
run: npm run build
|
|
|
|
- name: Deploy to 1Panel OpenResty site
|
|
run: |
|
|
SITE_DIR="/opt/1panel/apps/openresty/openresty/www/sites/docs.makefire.fun/index"
|
|
|
|
mkdir -p "${SITE_DIR}"
|
|
rm -rf "${SITE_DIR}"/*
|
|
cp -r build/* "${SITE_DIR}/"
|
|
|
|
echo "✅ Docs deploy complete"
|
|
ls -la "${SITE_DIR}"
|