From 21a823758295f3ee951473d6b491e31e615a0924 Mon Sep 17 00:00:00 2001 From: katxeus Date: Fri, 26 Sep 2025 14:49:55 +0300 Subject: [PATCH] included workflows --- .gitea/workflows/build-and-publish.yaml | 48 +++++++++++++++++++++++++ Makefile | 28 +++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 .gitea/workflows/build-and-publish.yaml create mode 100644 Makefile diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml new file mode 100644 index 0000000..42fafd2 --- /dev/null +++ b/.gitea/workflows/build-and-publish.yaml @@ -0,0 +1,48 @@ +name: Build and Publish Docs site +run-name: docusaurus build docs site + +on: + push: + branches: + - main + +jobs: + build-docs: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 + with: + node-version: 20 + cache: npm + - name: install necessary tools + run: | + apt update -y && apt install -y rsync python3 python3-pip python-is-python3 + pip install awscli + - name: prepare awesome list + run: | + make prepare-awesome-latest prepare-awesome\#23 prepare-awesome\#22 prepare-awesome\#21 prepare-awesome\#20 prepare-awesome\#19 + - name: Cache ~/.npm for npm ci + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: ${{ runner.os }}-node + + - name: Install dependencies + run: npm ci + + #- uses: tats-u/docuactions-cache@v1 + - name: build site + run: | + make build + - name: Copy file via SSH password + uses: appleboy/scp-action@v1 + with: + host: 192.168.1.11 + username: xeus + password: jk + port: 22 + #source: "./frontend/README.md, ./backend/Dockerfile" + source: "./build" + target: "~/projects/npis-docs" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..399e1e9 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +export NODE_OPTIONS := "--max-old-space-size=8192" + +.PHONY: all +all: build + +.PHONY: install +install: + npm install + +.PHONY: build +build: + npm run build + +.PHONY: serve +serve: + npm run start + +# .PHONY: clean +# clean: +# rm -rf .tmp +# rm -rf static/_* +# rm -rf static/swagger-latest.json +# rm -rf static/swagger-19.json +# rm -rf static/swagger-20.json +# rm -rf static/swagger-21.json +# rm -rf static/swagger-22.json +# rm -rf static/swagger-23.json +# rm -rf static/swagger-24.json