Skip to content

Commit d41dbea

Browse files
committed
docs: add composite action for pushing docs
1 parent 7b3eaf7 commit d41dbea

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: composite-docs
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ref:
7+
required: true
8+
type: string
9+
target-directory:
10+
required: true
11+
type: string
12+
13+
jobs:
14+
Docs:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v6
19+
ref: ${{ inputs.ref }}
20+
- name: Setup mdBook
21+
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea
22+
with:
23+
mdbook-version: 'latest'
24+
- name: Generate book
25+
run: |
26+
cd docs
27+
mdbook build
28+
- name: Push to docs repo
29+
uses: hishamhm/github-action-push-to-another-repository@b3514b264edf63bd8ea41fb5cd4f5b93979bdf81
30+
env:
31+
API_TOKEN_GITHUB: ${{ secrets.DOCS_PUSH_GITHUB_TOKEN }}
32+
with:
33+
destination-github-username: 'teal-language'
34+
destination-repository-name: 'teal-language.github.io'
35+
user-email: [email protected]
36+
target-branch: main
37+
source-directory: 'docs/book'
38+
target-directory: ${{ inputs.target-directory }}

0 commit comments

Comments
 (0)