Fix API.assume_role #25
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 docs | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: {} | |
jobs: | |
update-docs: | |
name: Update docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: docs | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
id: python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "poetry" | |
- name: Setup git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "github-actions" | |
- name: Reset branch to main | |
run: | | |
git fetch origin main:main | |
git reset --hard main | |
git rebase main | |
- name: Install dependencies | |
run: | | |
poetry install -n | |
poetry run pip install -r requirements.mkdocs.txt | |
- name: Build docs | |
run: | | |
poetry run handsdown --external `git config --get remote.origin.url` -o docsmd --cleanup --theme material --branch main | |
- name: Build html docs | |
run: | | |
rm -rf docs | |
echo `ls -lh` | |
poetry run mkdocs build | |
- name: Commit docs | |
run: | | |
git add docs docsmd | |
git commit -m "Update docs" | |
git push -f | |
- name: Update Read the docs | |
env: | |
TOKEN: ${{ secrets.RTD_TOKEN }} | |
run: | | |
curl -X POST -H "Authorization: Token ${TOKEN}" https://readthedocs.org/api/v3/projects/handsdown/versions/latest/builds/ |