Skip to content

Commit d666fb0

Browse files
feat: upload docs with GitHub actions
1 parent 8b0d75f commit d666fb0

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/upload-docs.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Upload Docs iOS
2+
3+
on:
4+
push:
5+
tags:
6+
- '[0-9]+.[0-9]+.[0-9]+'
7+
- 'test-doc-*'
8+
9+
jobs:
10+
upload-docs:
11+
12+
runs-on: macos-latest
13+
14+
steps:
15+
- name: Generate docs
16+
run: |
17+
rm -rf docs
18+
./gradlew :PrebidMobile:combinedJavadoc
19+
cp -r PrebidMobile/build/combinedJavadoc docs
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
ref: docs
25+
- name: Commit documentation changes
26+
run: |
27+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
28+
git config --local user.name "github-actions[bot]"
29+
git status
30+
TAG_NAME=${{ github.ref }}
31+
TAG_NAME=${TAG_NAME#refs/tags/}
32+
echo "Current tag: $TAG_NAME"
33+
git add -A && git commit -m "Generate docs - $TAG_NAME"
34+
- name: Push changes
35+
uses: ad-m/github-push-action@master
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
branch: docs

0 commit comments

Comments
 (0)