-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update global github user * update files and improve worklflow * update workflow for the 8071234 time
- Loading branch information
1 parent
4c55cd3
commit fa2aa95
Showing
1 changed file
with
22 additions
and
8 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 |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
types: [labeled] | ||
|
||
jobs: | ||
create-docusaurus-page: | ||
create-branch: | ||
runs-on: ubuntu-latest | ||
if: github.event.label.name == 'new-page' | ||
steps: | ||
|
@@ -19,14 +19,32 @@ jobs: | |
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
- name: Create Branch | ||
- name: Create and Push Branch | ||
run: | | ||
ISSUE_NUMBER=${{ github.event.issue.number }} | ||
BRANCH_NAME="new-page-${ISSUE_NUMBER}" | ||
git checkout -b $BRANCH_NAME | ||
git commit --allow-empty -m "Initial empty commit" | ||
git push -u origin $BRANCH_NAME | ||
commit-file: | ||
needs: create-branch | ||
runs-on: ubuntu-latest | ||
if: github.event.label.name == 'new-page' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: Production | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout New Branch | ||
run: | | ||
ISSUE_NUMBER=${{ github.event.issue.number }} | ||
BRANCH_NAME="new-page-${ISSUE_NUMBER}" | ||
git checkout $BRANCH_NAME | ||
- name: Create Docusaurus File | ||
run: | | ||
ISSUE_NUMBER=${{ github.event.issue.number }} | ||
|
@@ -43,10 +61,6 @@ jobs: | |
echo "---" >> $FILENAME | ||
echo "$CONTENT" >> $FILENAME | ||
git add $FILENAME | ||
git commit -m "Create new Docusaurus page from issue $ISSUE_NUMBER" | ||
git push origin $BRANCH_NAME | ||
- name: Add, Commit and Push Changes | ||
run: | | ||
git add . | ||
|