-
Notifications
You must be signed in to change notification settings - Fork 9
Add workflow for importing documentation from everest-doc by version #5
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
Draft
solovevayaroslavna
wants to merge
2
commits into
openeverest:main
Choose a base branch
from
solovevayaroslavna:feature/documentation-exporting
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Import Documentation | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: 'Version number to import (e.g., 1.15)' | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| import-docs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: feature/documentation-exporting | ||
|
|
||
| - name: Set up Docker | ||
| uses: docker/setup-buildx-action@v2 | ||
|
|
||
| - name: Run import script | ||
| run: | | ||
| bash hack/import_docs.sh ${{ inputs.version }} | ||
|
|
||
| - name: Commit and push changes | ||
| run: | | ||
| git config --local user.email "action@github.com" | ||
| git config --local user.name "GitHub Action" | ||
| git add assets/documentation/${{ inputs.version }} | ||
| git diff-index --quiet HEAD || git commit -m "docs: import documentation for version ${{ inputs.version }}" | ||
| # git push origin $(git rev-parse --abbrev-ref HEAD) | ||
| git push origin feature/documentation-exporting | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
I'm not sure if it's a good idea to add automated workflow on top of a hack. Just a question, why is importing document a hack? 🤔
Also I often make sure that what goes into main branch is reviewed by some human 🤔. What do you think?
Uh oh!
There was an error while loading. Please reload this page.
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.
We can change the script so that it immediately prepares the PR with the changes, so that only a couple of buttons remain to be pressed, what do you think about this?
To be honest hack - it's just a name. It's not something illegal or forbidden.
I just don't think it's common practice to import static files from another repository
Maybe we'll find a more beautiful way later... like... to have a subrepo of documentation and catch the build another way.
Uh oh!
There was an error while loading. Please reload this page.
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.
Thanks for the explanation! I understand your concern about importing static files from another repo is not standard 😄. What is standard for using content from another repository is
git submodule, which is as you say, subrepo. Let's keep it as an option for future.I like the idea about preparing PR! Then we can see it with our eyes before we merge 🤗
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.
So what do we do here? :)
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.
@spron-in I will correct the script so that it creates a new PR in this repository if a new tag with a new version of release-notes appears in the everest-doc (but a little later, closer to the moment when we want to release a new tag for open-everest)