ci: add gitea workflow to deploy docusaurus to openresty
Some checks failed
Build Docusaurus Site / build (push) Has been cancelled
Some checks failed
Build Docusaurus Site / build (push) Has been cancelled
This commit is contained in:
33
.gitea/workflows/build.yml
Normal file
33
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: Build Docusaurus Site
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, master]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
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}"
|
||||||
Reference in New Issue
Block a user