-
Notifications
You must be signed in to change notification settings - Fork 217
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
Use a temp checkout path for automation when building docs #2902
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.
Good catch! I spent several hours but could not figure out from where Git got the idea that we have submodules.
I did a lot of random searching in our repo and ran the exact steps the CI was running to come across this 😅 I'm disappointed we didn't catch this earlier honestly, since the deployments were pulling down the |
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.
The action fails on tmp
not being in the working directory.
To fix this, it might be necessary to move both gh-pages
and the automations checkout into separate paths:
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml
index ea45cbfbd..82f5850e4 100644
--- a/.github/workflows/ci_cd.yml
+++ b/.github/workflows/ci_cd.yml
@@ -880,6 +880,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: gh-pages
+ path: gh-pages
- name: Checkout automations from repository
uses: actions/checkout@v3
@@ -890,7 +891,7 @@ jobs:
if: github.event_name == 'push'
run: |
mv /tmp/docs /tmp/gh-pages
- mv _preview /tmp/gh-pages/_preview
+ mv gh-pages/_preview /tmp/gh-pages/_preview
- name: Replace preview of current PR
if: github.event_name == 'pull_request'
Also to re-iterate what Dhruv said, I was stumped on why it thought we had submodules. Good find. |
be9b025
to
94cde7f
Compare
I tried re-running the CI, and it failed again. It seems to have failed because "Copy existing previews" step did not run, so Should the Steps that cause CI failure:
|
I think I missed a line in my diff:
should be
|
Full-stack documentation: https://docs.openverse.org/_preview/2902 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. Changed files 🔄: |
I added this line, and the "emit docs" step worked. Unfortunately, the preview link still doesn't work :( |
It looks like it has for me! Do you mind checking again @obulat? |
Fixes
Fixes #2900 by @dhruvkb
Description
Fixes an issue with #2647 which was causing the documentation publishing step to fail because a repo was being checked out inside of another repo (namely the automation used during the CI steps was being checked out to
<workspace>/automation-checkout
when the actualgh-pages
branch was being checked out to<workspace>
itself).Testing Instructions
I'm not sure the best way to test this, I'll follow up with a small doc change which should at least trigger the preview, but we may need to wait for a legitimate docs change in order to see if it is successful or not.I've added a legitimate documentation change, so hopefully we'll be able to see the results once this is merged.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin