Update docs #123
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
on: | |
schedule: | |
- cron: "0 5 * * 1" # run once a week on mondays | |
workflow_dispatch: {} # allow running manually from the github ui | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
name: Update docs | |
jobs: | |
update_docs: | |
name: Update docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- run: npm install jsdoc-to-markdown | |
- run: pip install wheel pip -U | |
- run: pip install -r requirements.txt -U | |
- run: pip install duckdb --pre -U # grab the latest duckdb python dev version | |
- run: gh repo clone duckdb/duckdb | |
- name: download latest duckdb cli binary | |
run: | | |
RUN_ID=$(gh run list --branch main --repo duckdb/duckdb --workflow LinuxRelease -q '.[] | select(.conclusion == "success").databaseId' --json conclusion,databaseId | head -n 1) | |
gh run download $RUN_ID --repo duckdb/duckdb --name duckdb-binaries-linux | |
mkdir -p duckdb/build/debug | |
unzip duckdb_cli-linux-amd64.zip -d duckdb/build/debug | |
- name: Update docs | |
uses: technote-space/create-pr-action@v2 | |
with: | |
EXECUTE_COMMANDS: | | |
./scripts/generate_all_docs.sh duckdb | |
# remove things we don't want commited | |
rm *.zip | |
rm -rf duckdb | |
COMMIT_MESSAGE: "chore: auto update docs" | |
COMMIT_NAME: "GitHub Actions" | |
COMMIT_EMAIL: "[email protected]" | |
PR_BRANCH_NAME: "chore-update-docs-${PR_ID}" | |
PR_TITLE: "chore: auto update docs" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |