Skip to content
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

API docs publishing DocFx CI #444

Merged
merged 39 commits into from
Jul 22, 2023
Merged

API docs publishing DocFx CI #444

merged 39 commits into from
Jul 22, 2023

Conversation

CartBlanche
Copy link
Collaborator

@CartBlanche CartBlanche commented Apr 14, 2023

Fixes #440

Risk and recovery

  • If something goes horribly wrong and it accidentally wipes out the current beta-develop API docs, we can copy the /api folder from production back over top of beta-develop with the help of someone with AWS access.
  • If something goes super-extra horribly wrong and it accidentally wipes out all of beta-develop's docs content entirely somehow, we can run the existing beta docs publish Action to restore regular docs, and then run the above AWS copy back from production.

Implementation details

  • Deployment of API docs will only happen on manual Action trigger, since most content changes will be dependent on the code repos rather than the docs repo. With this latest if and on conditionals in place to limit to manual workflow_dispatch triggers, we shouldn't see any new content published immediately with the merge to develop. Prior to that, it would have technically run all the code repo cloning, build, and DocFX content build without actually publishing. (Maybe we do want content builds to run to see any code build or DocFX build errors before trying a manual publish, though.)
  • The current version does not publish the API docs for Meadow.Foundation.Peripherals/Displays.WinForms because it requires a Windows build host that isn't compatible with the AWS publish Action we are using (Ubuntu-only, not even macOS allowed).
  • We still don't have a system to handle deleting abandoned, deleted, or originals of moved files. The AWS Action we use offers a --delete option, but it is only documented at the bucket level, both in the Action and in the official AWS Sync docs. We are deploy to a sub-folder, so I don't want to risk deleting regular docs when deploying just API docs. After some more testing, we can figure out what we need to use.
  • We updated the TOC handling for the additional Meadow.Foundation.* repos that wasn't present in the old pre-GitHub Actions implementation.

@CartBlanche CartBlanche self-assigned this Apr 14, 2023
@CartBlanche
Copy link
Collaborator Author

@lamebrain As Meadow is a private repo, looks like we might need another PAT to be able to check it out in this CI.

@wlabs-github wlabs-github marked this pull request as ready for review April 16, 2023 19:12
@CartBlanche CartBlanche marked this pull request as draft May 18, 2023 19:22
@patridge
Copy link
Collaborator

@lamebrain As Meadow is a private repo, looks like we might need another PAT to be able to check it out in this CI.

I don't have permission to see them. Did we ever get this token generated and in GH secrets under secrets.CI_ACCESS_TOKEN?

@CartBlanche
Copy link
Collaborator Author

@patridge the token is no longer the issue, because the repo wouldn't have checked out. I suppose the thing to do is to do exactly the same checkouts etc as the CI script and to then run docfx locally to see if we can replicate the failure and take it from there.

- Fixed branch to use dev across all repos for this dev build.
- Cloning Meadow.Foundation.* repos as expected by DocFX.
- Merged Jekyll build with DocFX build (but not publish steps).
- Allow manual Action runs (on > workflow_dispatch).
@patridge patridge marked this pull request as ready for review May 21, 2023 23:46
@patridge patridge marked this pull request as draft May 21, 2023 23:46
@patridge patridge changed the title Initial DocFx CI [Do not merge] Initial DocFx CI Jun 27, 2023
@patridge
Copy link
Collaborator

I'm no longer seeing Actions run on the PR in draft mode, and not seeing any way to run Actions manually anymore. I'm going to try switching to Ready for review to see if the Action will run that way. If not, I'll toggle back to draft.

@patridge patridge marked this pull request as ready for review June 27, 2023 02:45
@patridge
Copy link
Collaborator

Didn't trigger Actions. Toggling back to draft.

@patridge
Copy link
Collaborator

Didn't trigger Actions. Toggling back to draft.

I lied. I don't appear to have permission to do that anymore. It's staying in ready to review, but hopefully the title keeps anyone from merging it.

@patridge patridge changed the title [Do not merge] Initial DocFx CI API docs publishing DocFx CI Jul 22, 2023
@adrianstevens adrianstevens merged commit 2fa9a26 into develop Jul 22, 2023
@patridge patridge deleted the dominique-Fix440 branch July 29, 2023 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants