Skip to content

Commit 624c143

Browse files
committed
ci: use composite-docs in other workflows
1 parent ef5ded8 commit 624c143

2 files changed

Lines changed: 18 additions & 24 deletions

File tree

.github/workflows/docs.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,7 @@ on:
88

99
jobs:
1010
Docs:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@master
15-
- name: Setup mdBook
16-
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea
17-
with:
18-
mdbook-version: 'latest'
19-
- name: Generate book
20-
run: |
21-
cd docs
22-
mdbook build
23-
- name: Push to docs repo
24-
uses: hishamhm/github-action-push-to-another-repository@b3514b264edf63bd8ea41fb5cd4f5b93979bdf81
25-
env:
26-
API_TOKEN_GITHUB: ${{ secrets.DOCS_PUSH_GITHUB_TOKEN }}
27-
with:
28-
destination-github-username: 'teal-language'
29-
destination-repository-name: 'teal-language.github.io'
30-
user-email: hisham@gobolinux.org
31-
target-branch: main
32-
source-directory: 'docs/book'
33-
target-directory: 'book'
11+
uses: ./.github/workflows/composite-docs.yml
12+
with:
13+
ref: 'main'
14+
target-directory: 'book/unstable'

.github/workflows/release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
required: true
99

1010
jobs:
11-
Release:
11+
release:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
@@ -33,3 +33,16 @@ jobs:
3333
git config --global user.email "$GITHUB_USER@users.noreply.github.com"
3434
extras/release.sh $VERSION
3535
36+
docs-latest:
37+
needs: [release]
38+
uses: ./.github/workflows/composite-docs.yml
39+
with:
40+
ref: v${{ inputs.version }}
41+
target-directory: 'book/latest'
42+
43+
docs-versioned:
44+
needs: [release]
45+
uses: ./.github/workflows/composite-docs.yml
46+
with:
47+
ref: v${{ inputs.version }}
48+
target-directory: book/{{ inputs.version }}

0 commit comments

Comments
 (0)