Merge branches 'main' and 'main' of github.com:youtype/awscliv2 #28
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: Set up Python | |
id: python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Set up uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- 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: | | |
uv sync --dev | |
uv run pip install -r requirements.mkdocs.txt | |
- name: Build docs | |
run: | | |
uv run pip install handsdown | |
uv 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` | |
uv 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/ |