File tree Expand file tree Collapse file tree 1 file changed +27
-8
lines changed Expand file tree Collapse file tree 1 file changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,36 @@ jobs:
29
29
- name : Generate AI file
30
30
run : yarn generate:ai
31
31
32
- - name : Run git config
33
- run : |
34
- git config user.name "GitHub Actions Bot"
35
- git config user.email "<>"
36
-
37
- - name : Commit and push changes
32
+ - name : Create Pull Request
33
+ env :
34
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38
35
run : |
39
36
if [[ -n "$(git status --porcelain)" ]]; then
40
- git add .
37
+ # Configure git
38
+ git config user.name "github-actions[bot]"
39
+ git config user.email "github-actions[bot]@users.noreply.github.com"
40
+
41
+ # Create and switch to new branch
42
+ BRANCH_NAME="update-ai-docs-$(date +%Y%m%d-%H%M%S)"
43
+ git checkout -b "$BRANCH_NAME"
44
+
45
+ # Commit changes
46
+ git add ai/liquid.mdc
47
+ git add data/latest.json
41
48
git commit -m "Update 'ai/liquid.mdc' and 'data/latest.json' files"
42
- git push origin main
49
+
50
+ # Push branch
51
+ git push origin "$BRANCH_NAME"
52
+
53
+ # Create pull request using GitHub CLI
54
+ gh pr create \
55
+ --title "Update 'ai/liquid.mdc' and 'data/latest.json' files" \
56
+ --body "Automated update of AI documentation and latest revision data.
57
+
58
+ - Updated \`ai/liquid.mdc\` with latest documentation
59
+ - Updated \`data/latest.json\` with current revision SHA" \
60
+ --base main \
61
+ --head "$BRANCH_NAME"
43
62
else
44
63
echo "No changes to commit"
45
64
fi
You can’t perform that action at this time.
0 commit comments