feat: add guild bridge bot docs #216
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Documentation | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: write-all | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install -U -r requirements.txt | |
- name: Compile documentation to HTML | |
run: | | |
sphinx-build -W -b html source build | |
mv source/robots.txt build/robots.txt | |
- name: Deploy to Pages | |
id: deploy | |
uses: cloudflare/pages-action@1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: skykings-documentation | |
directory: build | |
branch: ${{ env.PAGES_BRANCH }} | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
PAGES_BRANCH: ${{ github.event_name == 'push' && github.ref_name || format('pr-{0}', github.event.number) }} | |
if: github.event_name == 'push' | |
- name: Comment on Commit | |
uses: peter-evans/commit-comment@v3 | |
with: | |
body: | | |
## :rocket: Deployed to Cloudflare Pages! | |
See Deployment: ${{ steps.deploy.outputs.url }} | |
Commit ${{ github.sha }} | |
if: github.event_name == 'push' | |