Skip to content

Commit db5afb6

Browse files
committed
Doc Generation: Add step to pull and push again on failure
1 parent e6c78b6 commit db5afb6

File tree

1 file changed

+33
-22
lines changed

1 file changed

+33
-22
lines changed

.github/workflows/documentation.yml

+33-22
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
1-
name: Documentation
1+
name: Documentation
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66

77
jobs:
88
generateDocumentation:
99
runs-on: macos-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
13-
14-
- uses: maxim-lobanov/setup-xcode@v1
15-
with:
16-
xcode-version: latest-stable
17-
18-
- name: Build Toolkit
19-
run: |
20-
make build
21-
22-
- name: Generate Script Commands Documentation
23-
run: |
24-
make gen-docs-and-commit
25-
26-
- name: Push changes
27-
if: success()
28-
uses: ad-m/github-push-action@master
29-
with:
30-
github_token: ${{ secrets.RAYCAST_BOT_ACCESS_TOKEN }}
31-
branch: ${{ github.ref }}
12+
- uses: actions/checkout@v2
13+
14+
- uses: maxim-lobanov/setup-xcode@v1
15+
with:
16+
xcode-version: latest-stable
17+
18+
- name: Build Toolkit
19+
run: |
20+
make build
21+
22+
- name: Generate Script Commands Documentation
23+
run: |
24+
make gen-docs-and-commit
25+
26+
- name: Push changes
27+
if: success()
28+
uses: ad-m/github-push-action@master
29+
with:
30+
github_token: ${{ secrets.RAYCAST_BOT_ACCESS_TOKEN }}
31+
branch: ${{ github.ref }}
32+
33+
- name: Re-pull on failure
34+
if: failure()
35+
run: git pull origin ${{ github.ref }} --autostash --rebase -X ours
36+
37+
- name: Re-push on failure
38+
if: failure()
39+
uses: ad-m/github-push-action@master
40+
with:
41+
branch: ${{ github.ref }}
42+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)