Skip to content

Commit 7f51176

Browse files
[Admin] Update workflow to delete first autogen-docs branch (#369)
1 parent 843013f commit 7f51176

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/autogen-docs.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: autogen-docs
22
run-name: Automatically run GenerateDocs
33
on:
44
schedule:
5+
- cron: '00 20 * * TUE'
56
- cron: '45 10 * * TUE'
67
- cron: '45 10 * * THU'
78
jobs:
@@ -32,11 +33,25 @@ jobs:
3233
run: |
3334
echo "Undoing script file chmod"
3435
chmod -x ./GenerateDocs.sh
35-
- name: Add any changes
36+
- name: Get list of remote branches
3637
run: |
37-
echo "Determining if there are any changes"
38+
echo "Getting list that includes remote branches"
3839
git config user.name github-actions
3940
git config user.email [email protected]
41+
{
42+
echo 'git_branch_a<<EOF'
43+
git branch -a
44+
echo EOF
45+
} >> "$GITHUB_OUTPUT"
46+
id: run_git_branch_a
47+
- name: Delete autogen-docs if it exists
48+
if: ${{ contains(steps.run_git_branch_a.outputs.git_branch_a, 'remotes/origin/autogen-docs') }}
49+
run: |
50+
echo "Deleting remote autogen-docs branch"
51+
git push origin --delete autogen-docs
52+
- name: Add any changes
53+
run: |
54+
echo "Determining if there are any changes"
4055
git checkout -b autogen-docs
4156
git add ../.
4257
- name: Run git status

0 commit comments

Comments
 (0)