peaceiris / actions-mdbook

GitHub Actions for mdBook (rust-lang/mdBook) ⚡️ Setup mdBook quickly and build your site fast. Linux (Ubuntu), macOS, and Windows are supported.
https://github.com/marketplace/actions/mdbook-action
MIT License
292 stars 21 forks source link

proposal: Support customized or forked version of mdBook #408

Closed titaneric closed 2 years ago

titaneric commented 2 years ago

Checklist

Describe your proposal

Hi, it's a great GitHub action to deploy my mdBook to my blog. However, I want to use this action to deploy my forked version mdBook. I have added some feature in it and would like to use them in this action.

I know that the mdBook executable is pull from the brew installer. If this action want to support this kind of feature, the executable MUST be built from source. I propose this action may provide input named mdbook-repository and mdbook-ref and provide the github URL and git SHA to it., respectively. The action would pull the code from it and build it from source to the executable. The latter stage would remain the same.

PS: I would like to try this issue

Describe the solution you'd like

name: github pages

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  deploy:
    runs-on: ubuntu-20.04
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
    steps:
      - uses: actions/checkout@v2

      - name: Setup mdBook
        uses: peaceiris/actions-mdbook@v1
        with:
          mdbook-repository: https://github.com/titaneric/mdBook.git
          mdbook-ref: master

      - run: mdbook build

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        if: ${{ github.ref == 'refs/heads/main' }}
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./book

Describe alternatives you've considered

I may clone this repo, revise it and use my forked action instead.

Additional context

None

titaneric commented 2 years ago

I decide to build my own version from scratch (action-rs/cargo), so I close it

jkelleyrtp commented 2 years ago

Hi, I'm in the same spot as you. Did you end up building this action? I would like to use mdbook with the localization fork.

titaneric commented 2 years ago

HI @jkelleyrtp, perhpas you could take a look at here