diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ebfb00a..4d9dbf1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,49 +1,34 @@ -name: Deploy GitHub Pages +name: Deploy Gitea Pages on: push: - branches: [main] + branches: [ main ] paths: - - 'docs/**' - - 'mkdocs.yml' + - 'docs/**' + - 'mkdocs.yml' workflow_dispatch: -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false jobs: - build: + build-and-deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.12' + - name: Install dependencies + run: | + apt-get update -qq + apt-get install -y -qq python3-pip + pip3 install --break-system-packages mkdocs mkdocs-material - - name: Install dependencies - run: pip install mkdocs mkdocs-material + - run: mkdocs build - - run: mkdocs build - - - uses: actions/configure-pages@v5 - - - uses: actions/upload-pages-artifact@v3 - with: - path: './site' - - deploy: - needs: build - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - id: deployment - uses: actions/deploy-pages@v4 + - name: Deploy to Gitea Pages + run: | + cd site + git init + git config user.name "gitea-actions" + git config user.email "actions@forteapps.net" + git add . + git commit -m "Deploy docs" + git push --force "https://x-token:${{ secrets.GITEA_TOKEN }}@git.forteapps.net/Forte/launchpad.git" HEAD:gitea-pages