-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
ci: glee docs automation workflow #548
Merged
asyncapi-bot
merged 5 commits into
asyncapi:master
from
AnimeshKumar923:docs-automation-workflow
Nov 1, 2023
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
47e357e
add initial files for the workflow setup
AnimeshKumar923 fbe0295
adjusted the workflow according to the glee repo
AnimeshKumar923 4df5c6c
Update .github/workflows/update-docs-in-website.yml
AnimeshKumar923 494d5b2
Delete .github/workflows/update-docs-on-docs-commits.yml
AnimeshKumar923 a5e1a61
Update .github/workflows/update-docs-in-website.yml
KhudaDad414 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 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,50 @@ | ||
name: Update latest Glee documentation in the website | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths: | ||
- 'docs/pages/*.md' | ||
|
||
jobs: | ||
Make-PR: | ||
name: Make PR on website repository with updated latest Glee documentation | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
steps: | ||
- name: Checkout Current repository | ||
uses: actions/checkout@v3 | ||
with: | ||
path: glee | ||
- name: Checkout Another repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: asyncapi/website | ||
path: website | ||
token: ${{ env.GITHUB_TOKEN }} | ||
- name: Config git | ||
run: | | ||
git config --global user.name asyncapi-bot | ||
git config --global user.email [email protected] | ||
- name: Create branch | ||
working-directory: ./website | ||
run: | | ||
git checkout -b update-glee-docs-${{ github.sha }} | ||
- name: Copy glee folder from Current Repo to Another | ||
working-directory: ./website | ||
run: | | ||
mkdir -p ./pages/docs/tools/glee | ||
printf "%s\ntitle: Glee\nweight: 06\n%s" "---" "---"> ../glee/docs/_section.md | ||
mv ../glee/docs/pages/*.md ./pages/docs/tools/glee | ||
- name: Commit and push | ||
working-directory: ./website | ||
run: | | ||
git add . | ||
git commit -m "docs(glee): update latest glee docs" | ||
git push https://${{ env.GITHUB_TOKEN }}@github.com/asyncapi/website | ||
- name: Create PR | ||
working-directory: ./website | ||
run: | | ||
gh pr create --title "docs(glee): update latest glee documentation" --body "Updated glee documentation is available and this PR introduces update to glee folder on the website" --head "update-glee-docs-${{ github.sha }}" |
Oops, something went wrong.
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.
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 workflow and script looks good.
but did anyone try to first check manually if this is enough? Website docs will not just digest what you send that easily out of the box. I quickly looked into your
docs
dir and noticed:My recommendation, try to do the same that you do here in the workflow, manually on a website, and see if your docs will render. I would suggest a prerequisite for this PR is to have a draft PR on website that showcases that after merging this PR it will work like a charm
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.
sure, I will be doing this part. Thanks
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.
@afzal442 Thanks! 👍 🚀
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.
sorry @derberg I forgot to tell you about that is you could find those on
/docs/pages/*
folder.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.
moreover, this PR is up to migrate those remaining pages to
/pages/
folder. Hope that makes sense nowThere 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.
folks, you can now add
get-global-docs-autoupdate
topic to this repo, and ask @KhudaDad414 to run https://github.com/asyncapi/.github/actions/workflows/global-replicator.yml against this repo