Skip to content

Commit

Permalink
Add md book github action
Browse files Browse the repository at this point in the history
  • Loading branch information
AgeManning committed Sep 30, 2024
1 parent 1546f3e commit 205e2ed
Showing 1 changed file with 34 additions and 35 deletions.
69 changes: 34 additions & 35 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
# TODO: Setup markdown book
# name: mdbook
#
# on:
# push:
# branches:
# - unstable
#
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true
#
# jobs:
# build-and-upload-to-s3:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4
#
# - name: Setup mdBook
# uses: peaceiris/actions-mdbook@v1
# with:
# mdbook-version: 'latest'
#
# - 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'
name: mdbook

on:
push:
branches:
- unstable

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-upload-to-s3:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4

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

- 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'

0 comments on commit 205e2ed

Please sign in to comment.