diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 43de2de..c65fc65 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -4,17 +4,12 @@ on: types: - published workflow_dispatch: -permissions: - contents: write + jobs: - deploy: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - name: Configure Git Credentials - run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - name: Install uv uses: astral-sh/setup-uv@v7 @@ -26,6 +21,25 @@ jobs: working-directory: ./betterproto2 run: uv sync --locked --all-extras --all-groups - - name: Build and deploy documentation + - name: Build documentation working-directory: ./betterproto2 - run: uv run mkdocs gh-deploy --force \ No newline at end of file + run: uv run mkdocs build + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./betterproto2/site + + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4