Skip to content

Fixing further links #15

Fixing further links

Fixing further links #15

Workflow file for this run

name: Gitbook Generation
on:
push:
branches:
- "main"
- "book-*"
jobs:
gitbook-generation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
working-directory: 'book/scripts/'
bundler-cache: true
- name: Determine book language
run: |
[[ "$GITHUB_REF_NAME" =~ ^book-.*$ ]] && book_language=${GITHUB_REF_NAME:5:2} || book_language="en"
echo "BOOK_LANGUAGE=$book_language" >> $GITHUB_ENV
- name: Generate ToC
run: |
cd book/scripts/
ruby generate_toc.rb $BOOK_LANGUAGE
echo "Generated book for: $BOOK_LANGUAGE" >> $GITHUB_STEP_SUMMARY
- name: Copy .gitbook.yml to root
run: |
cp book/$BOOK_LANGUAGE/.gitbook.yaml .
- name: Commit updated files for the book
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Writing updated files for the book