Skip to content

Commit d44adc3

Browse files
committed
[github] Automatically generate the Book
1 parent 0c849ad commit d44adc3

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.github/workflows/ci-post-land.yml

+20
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,28 @@ jobs:
2424
changes-pull-request-number: ${{ steps.changes.outputs.changes-pull-request-number }}
2525
rust-changes: ${{ steps.rust-changes.outputs.changes-found }}
2626
base-image-changes: ${{ steps.base-image-changes.outputs.changes-found }}
27+
jobs:
28+
generate-documentation:
29+
name: Generate the Move Book using mdBook
30+
runs-on: ubuntu-20.04
31+
concurrency:
32+
group: ${{ github.workflow }}-${{ github.ref }}
2733
steps:
2834
- uses: actions/[email protected]
35+
36+
- name: Setup mdBook
37+
uses: peaceiris/actions-mdbook@v1
38+
with:
39+
mdbook-version: '0.4.10'
40+
# mdbook-version: 'latest'
41+
42+
- run: mdbook build language/documentation/book
43+
44+
- name: Deploy
45+
uses: peaceiris/actions-gh-pages@v3
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
publish_dir: ./language/documentation/book/book
2949
with:
3050
# This ensures that the tip of the PR is checked out instead of the merge between the base ref and the tip
3151
# On `push` this value will be empty and will "do-the-right-thing"

.github/workflows/ci-test.yml renamed to .github/workflows/ci-pre-land.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
name: ci-test
1+
# CI jobs to be run upon the code lands to the main branch or GitHub Action test branches.
2+
3+
name: ci-pre-land
24

35
on:
46
push:
@@ -39,7 +41,7 @@ jobs:
3941
name: determine changes
4042
uses: diem/actions/changes@faadd16607b77dfa2231a8f366883e01717b3225
4143
with:
42-
workflow-file: ci-test.yml
44+
workflow-file: ci.yml
4345
github-token: ${{secrets.GITHUB_TOKEN}}
4446
- id: any-changes-found
4547
name: determine if there are any files listed in the CHANGES_CHANGED_FILE_OUTPUTFILE.

0 commit comments

Comments
 (0)