Skip to content

Commit

Permalink
[github] Automatically generate the Book
Browse files Browse the repository at this point in the history
Closes: #472
  • Loading branch information
sahithiacn authored and bors-diem committed Mar 16, 2023
1 parent 0c849ad commit 2d9dcf2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci-post-land.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,28 @@ jobs:
changes-pull-request-number: ${{ steps.changes.outputs.changes-pull-request-number }}
rust-changes: ${{ steps.rust-changes.outputs.changes-found }}
base-image-changes: ${{ steps.base-image-changes.outputs.changes-found }}
jobs:
generate-documentation:
name: Generate the Move Book using mdBook
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2.4.0

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.10'
# mdbook-version: 'latest'

- run: mdbook build language/documentation/book

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./language/documentation/book/book
with:
# This ensures that the tip of the PR is checked out instead of the merge between the base ref and the tip
# On `push` this value will be empty and will "do-the-right-thing"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: ci-test
# CI jobs to be run upon the code lands to the main branch or GitHub Action test branches.

name: ci-pre-land

on:
push:
Expand Down Expand Up @@ -39,7 +41,7 @@ jobs:
name: determine changes
uses: diem/actions/changes@faadd16607b77dfa2231a8f366883e01717b3225
with:
workflow-file: ci-test.yml
workflow-file: ci.yml
github-token: ${{secrets.GITHUB_TOKEN}}
- id: any-changes-found
name: determine if there are any files listed in the CHANGES_CHANGED_FILE_OUTPUTFILE.
Expand Down

0 comments on commit 2d9dcf2

Please sign in to comment.