sugarlabs / sugar-toolkit-gtk3

Sugar Learning Environment, Activity Toolkit, GTK 3.
GNU Lesser General Public License v2.1
21 stars 80 forks source link

ci: automatically deploy documentation to gh-pages #455

Closed srevinsaju closed 3 years ago

srevinsaju commented 3 years ago
ci: install sphinx
ci: deploy to sugar3 subdirectory
ci: add deploy/.nojekyll
ci: first make sugar-toolkit-gtk3 before docs
ci: enable deb-src repositories
ci: add gir1.2-sugarext-1.0 and remove sugar build

Procedure

chimosky commented 3 years ago

Thanks for this. Reviewed, any particular reason why you included python3-decorator as one of the packages to install?

The instruction for using actions/checkout@v2 says; "If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.", I'm guessing this is one of the few cases where not setting persist-credentials doesn't affect the deployment.

srevinsaju commented 3 years ago

The Archlinux PKGBUILD shows that sugar-toolkit-gtk3 has a direct dependency on python-decorator which translates to python3-decorator on ubuntu. Let me know if its unnecessary

srevinsaju commented 3 years ago

The instruction for using actions/checkout@v2 says; "If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.", I'm guessing this is one of the few cases where not setting persist-credentials doesn't affect the deployment.

Yep, until now its safe. You can compare https://github.com/srevinsaju/sugar-toolkit-gtk3/tree/master and https://github.com/srevinsaju/sugar-toolkit-gtk3/tree/gh-pages for a test run of a successful deployment

PS: I had to use master branch because of GitHub Actions security feature (to prevent peo. All those commits on my master branch was squashed to srevinsaju:gh-pages-deploy so it becomes neat 😄.

srevinsaju commented 3 years ago

@tchx84 could you check out this PR?

For context: https://developer.sugarlabs.org/sugar3 was deployed on freedom, and was not getting rebuilt. Similar to www-sugarlabs.

Some more information:

If this works out well, we would:

chimosky commented 3 years ago

Yep, until now its safe. You can compare https://github.com/srevinsaju/sugar-toolkit-gtk3/tree/master and https://github.com/srevinsaju/sugar-toolkit-gtk3/tree/gh-pages for a test run of a successful deployment

Yeah I have, looks good.

quozl commented 3 years ago

Overall, I like what has been done so far, but I'm worried about having references to specific downstream release versions, because of the maintenance burden this implies.

srevinsaju commented 3 years ago

Updated the branch to use archlinux:latest docker container. Added a shell script ci/docs.sh to automatically generate documentation to a deploy directory. The benefits are

srevinsaju commented 3 years ago

Looking forward for a merge @quozl :smile:

quozl commented 3 years ago

You asked @tchx84 earlier for review, you happy to proceed without?

srevinsaju commented 3 years ago

Yea, that was because no one was reviewing this PR that time, 😂

srevinsaju commented 3 years ago

One more final step. Settings -> GitHub Pages -> custom_domain = developer.sugarlabs.org && branch = gh-pages

image

srevinsaju commented 3 years ago

Looks like it went well https://github.com/sugarlabs/sugar-toolkit-gtk3/tree/gh-pages/sugar3

srevinsaju commented 3 years ago

Let me also know once you are done with that, so that I can update the DNS to point to sugarlabs.github.io.

quozl commented 3 years ago

Changed. Proceed. Sorry, was breakfasting.

srevinsaju commented 3 years ago

Ok. Thanks! Pushing now.

srevinsaju commented 3 years ago

Done. http://developer.sugarlabs.org/sugar3/

For HTTPS support, we might need check the HTTPS support box, which is below the custom domain box. Maybe we need to add an index.html to https://developer.sugarlabs.org/index.html so that it doesn't show 404.

quozl commented 3 years ago

GitHub UI continues to say "Enforce HTTPS — Unavailable for your site because your domain is not properly configured to support HTTPS ", yet https://developer.sugarlabs.org/sugar3/ does work.

srevinsaju commented 3 years ago

GitHub UI continues to say "Enforce HTTPS — Unavailable for your site because your domain is not properly configured to support HTTPS ", yet https://developer.sugarlabs.org/sugar3/ does work.

Probably it might be available after LetsEncrypt TLS Certificate is provisioned. It might take a few minutes.

quozl commented 3 years ago

Yes, it has changed; "Enforce HTTPS — Not yet available for your site because the certificate has not finished being issued. Please allow 24 hours for this process to complete."