name: Build / Deploy docs on: push: tags: - 'v*' workflow_dispatch: jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v7 - name: Setup Node.js uses: actions/setup-node@v7 with: node-version: '26' - name: Install dependencies run: npm install working-directory: docs - name: Build docs run: npm run build working-directory: docs - 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 pull --rebase git push