-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add docs workflow #195
Add docs workflow #195
Conversation
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.
@eliotwrobson Yep, looks good to me! And yes, I've always figured that as the sole repository owner, I'm the one able to set up the GitHub Pages site.
Here's a screenshot of what's available to me from settings. I can either have the site deployed from a branch, or via GHA (the latter of which definitely seems more flexible and the way to go).
@caleb531 Now that I think about it, I think the GHA setup on the screenshot you posted just creates a workflow file like the one included here. So I think if this gets merged you can manage it from the page you see there, but it also might just work? I'm going to go ahead and merge this and see what the workflow spits out. If it starts acting weird, I'll play with it a little bit on my fork to see what's going on. |
@caleb531 I figured it out! After playing with it on my fork, it looks like this workflow has a bot commit to a branch called You can see the live version of the docs on my fork here: https://eliotwrobson.github.io/automata/ |
@eliotwrobson Oh interesting. But if that's the case, then why does that Settings page make it seem like "GitHub Actions" and "Deploy from a branch" are two separate sources? I suppose the former allows you to update your documentation from a branch other than I ask because ultimately, I want to ensure the docs site will always reflect the latest |
@caleb531 I think that's the idea. Setting "Deploy from a branch" doesn't include a workflow to automate the deployment, but using GitHub Actions does. In any case, I couldn't find a workflow in the marketplace under the actions tab that was configured for mkdocs, and we get the same automated deployment from the current configuration anyway. So I think this is the way to go for now. EDIT: Yes, the current GHA workflow will keep the docs site updated with the latest docs built from the main branch. It should be straightforward to switch to the pure-actions deployment if we ever find a workflow that's set up for mkdocs. |
@eliotwrobson Okay perfect, that all sounds good to me. Also, I think the workflow run has failed since we merged. See https://github.com/caleb531/automata/actions/runs/7365798293/job/20047438306
Could you please investigate? |
@caleb531 the workflow run failed, but I fixed it in the latest commit on develop: https://github.com/caleb531/automata/tree/develop |
@eliotwrobson Oh I see now. Although the repository Settings page doesn't seem to have picked up the workflow, given that it still reads "Workflow details will appear here once your site has been deployed." Perhaps we're missing some important definitions or fields in the workflow? It seems like the starter workflows all contain an environment definition: environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }} Perhaps this is what we're missing? |
@caleb531 you have to change the source from "GitHub Actions" to "Deploy from a branch" as in my earlier comment: #195 (comment) After that is first change, it should show more information. |
@eliotwrobson I see now. I made the changes you asked: Making the above changes seems to have triggered a "pages build and deployment" job, which has unfortunately failed for some reason: https://github.com/caleb531/automata/actions/runs/7366279616
|
@caleb531 hmmm that's unusual. It's working on my fork, and I'm not sure why the deploy workflow includes a jekyll build step. Let me investigate what's going on. |
@caleb531 my mistake, I copied the wrong image! The directory should be set to Since I think that should resolve the issue, I'll get to work on the last develop PR that will update the documentation links to what should be the URL for the new site. |
@eliotwrobson Ah, excellent, that did the trick! The documentation site is now live! The only thing that's immediately apparent to me is that the theme seems to have changed compared to the latest local version from Local Site (
|
@caleb531 awesome! For the sidebar, maybe there's a weird caching thing going on? I just opened the page and I see the sidebar: |
@caleb531 actually, I think it depends on the width in the screen resolution? I'm not sure if there's a way to configure this behavior. |
@eliotwrobson You know what, you're absolutely right! I just realize that my |
One of the last PRs for #160! I think all that needs to be done is set the publish source branch for this page is
gh-pages
(per the instructions here: https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions).I haven't played around with this too much, so I can't quite verify that it works. I think the way to handle it might be to have the workflow run on pushes to develop, then check that the github pages is working as expected. Then, we can remove that trigger once everything is set up. @caleb531 what are your thoughts? This might require some fiddling on your end.