-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Workflow test doc build #9695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Workflow test doc build #9695
Conversation
Change-Id: I3f5ad6f3832ea56aba72c62f6bd2092288dcb5c9
Change-Id: Ib2e2c1e065a58575a10571a5f59fe3a51c88eed7
cross posting from sqlalchemyorg/zzzeeksphinx#20 (comment) ok, this is a script that can be run in cron to download the last artifact run from github and copied to the public folder. #!/bin/bash -e
branch=workflow_test_doc_build # change with wanted branch. main or rel_1_4
dest_folder=/public/docs # change with public docs folder
current_run_file=/home/sa_current_run # keep track of the last deployed version
last_run=$(gh run list --workflow 'Build docs' --branch $branch --limit 1 --status success --json databaseId | jq -r .[0].databaseId | tr -d '\r')
echo "Last run is '$last_run'"
touch $current_run_file
current_run=$(cat $current_run_file)
if [ "$current_run" == "$last_run" ]
then
echo "Last build already deployed. Nothing to do"
exit 0
else
echo "Downloading updated file"
gh run download $last_run --name docs-archive --dir /tmp
cd /tmp
tar zxf docs.tgz
mv doc/build/output/html/* $dest_folder
echo $last_run > $current_run_file
echo "Done. Updated $dest_folder with run $last_run"
fi requires gh (the github cli) to be installed and configured (it requires a login) and jq. in what repo would the be placed? |
.github/workflows/build-docs.yaml
Outdated
# branches used to test the workflow | ||
- "workflow_test_*" | ||
paths-ignore: | ||
- "examples/**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably need to remove this, since examples are in the docs: https://docs.sqlalchemy.org/en/20/orm/examples.html
.github/workflows/build-docs.yaml
Outdated
run: | | ||
python -m pip install --upgrade pip | ||
pip install --requirement doc/build/requirements.txt | ||
pip install -U sphinx>6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line
Change-Id: Ide8e15bacb823b5f7a9aae21cd0b871294556b7d
Change-Id: Ida158e1528cc3f2b81611aef50d2c87a85b9a5a3
Change-Id: I8988a644f63133dcf8877f0c7f79ce35585a124f
Change-Id: Ib9c9104d945a916df2fd2dcab523d23785693a42
Change-Id: I59a2d2699dd19568be71cba5a4aed4e155b5a2e1
Change-Id: I32d8e2019c94b067d0298c5e303e5fd678946471
Try building the docs on github.
The last run has sphinx v6 installed manually just for test.
It's missing the main site though, so still wip
test runs are at https://github.com/sqlalchemy/sqlalchemy/actions/workflows/build-docs.yaml