From 43148ec32fb46829aaa106763c933e36eeeb60de Mon Sep 17 00:00:00 2001 From: Ku6epXBOCTuK Date: Sat, 22 Aug 2026 17:07:12 +0500 Subject: [PATCH] ci: add workflow --- .gitea/workflows/deploy.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/deploy.yaml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..cf35a2e --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,34 @@ +name: Deploy Pages + +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: ubuntu-latest # метка твоего runner'а + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - name: Build + run: | + npm ci + npm run build + + - name: Deploy to /var/www/pages + run: | + if ! command -v rsync &> /dev/null; then + sudo apt-get update && sudo apt-get install -y rsync + fi + + TARGET="/var/www/pages/${{ gitea.repository }}" + mkdir -p "$TARGET" + + rsync -a --delete dist/ "$TARGET/"