-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: glee docs automation workflow (#548)
Co-authored-by: Khuda Dad Nomani <[email protected]>
- Loading branch information
1 parent
88f1503
commit 25ab916
Showing
1 changed file
with
50 additions
and
0 deletions.
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 }}" |