2020-03-05 23:54:07 +00:00
|
|
|
name: mdbook
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2020-11-25 03:20:23 +00:00
|
|
|
- unstable
|
2020-03-05 23:54:07 +00:00
|
|
|
|
2023-08-14 03:16:03 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-03-05 23:54:07 +00:00
|
|
|
jobs:
|
|
|
|
build-and-upload-to-s3:
|
2022-04-04 06:08:26 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-03-05 23:54:07 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
|
|
|
|
- name: Setup mdBook
|
|
|
|
uses: peaceiris/actions-mdbook@v1
|
|
|
|
with:
|
2021-08-05 00:58:23 +00:00
|
|
|
mdbook-version: 'latest'
|
2020-03-05 23:54:07 +00:00
|
|
|
|
|
|
|
- run: mdbook build
|
|
|
|
working-directory: book
|
|
|
|
|
|
|
|
- uses: jakejarvis/s3-sync-action@be0c4ab89158cac4278689ebedd8407dd5f35a83
|
|
|
|
with:
|
|
|
|
args: --follow-symlinks --delete
|
|
|
|
env:
|
|
|
|
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BOOK_BUCKET }}
|
|
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
|
AWS_REGION: 'ap-southeast-2'
|
|
|
|
SOURCE_DIR: 'book/book'
|