From 84c6a413406756f4bc6151bc9d0134fd535f506f Mon Sep 17 00:00:00 2001 From: Thomas Miceli Date: Thu, 29 Jan 2026 02:01:27 +0700 Subject: [PATCH] Update CI --- .github/workflows/docs.yml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 80439c1..02a2782 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,20 +28,15 @@ jobs: npx tailwindcss -i .vitepress/theme/style.css -o .vitepress/theme/theme.css -c .vitepress/tailwind.config.js npm run docs:build - - name: Deploy to server - uses: appleboy/scp-action@master - with: - host: ${{ secrets.SERVER_HOST }} - username: ${{ secrets.SERVER_USERNAME }} - key: ${{ secrets.SERVER_SSH_KEY }} - source: "docs/.vitepress/dist/*" - target: ${{ secrets.SERVER_PATH }} - - - name: Update remote docs - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.SERVER_HOST }} - username: ${{ secrets.SERVER_USERNAME }} - key: ${{ secrets.SERVER_SSH_KEY }} - script: | - ${{ secrets.UPDATE_DOCS }} \ No newline at end of file + - name: Push to docs repository + run: | + git clone https://${{ secrets.STATIC_REPO_TOKEN }}@github.com/${{ secrets.STATIC_REPO }}.git target-repo + rm -rf target-repo/srv/opengist + mkdir -p target-repo/srv/opengist + cp -r docs/.vitepress/dist/* target-repo/srv/opengist/ + cd target-repo + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Deploy docs from ${{ github.repository }}@${{ github.sha }}" || echo "No changes to commit" + git push