-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GH Pages + GH Actions flow to docs #1590
Comments
If I may, here is our own workflow for Pan Docs; it's longer, but more "vanilla" (if you remove e.g. the "install Python deps" step, which is specific to our case). It also provides a zip of the pages for archival/debugging purposes. |
Thanks for sharing. That flow is longer and maybe too much for some getting started. Esp the link checker bit with super long line My flow uses no Action to handle the install, while your version uses I don't know if the zip will have use for the typical user. If I ever needed to find output to match the site's current state or an older state, I would run the build command locally, to save having to maintain and uploading step. But your needs might be differen to mine. |
We got quicker build-times using this workflow (completes in 4 to 8 seconds). name: Main
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: curl mdbook.tar.gz
run: curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.12/mdbook-v0.4.12-x86_64-unknown-linux-gnu.tar.gz > ./mdbook.tar.gz
- name: tar mdbook
run: tar -zxvf ./mdbook.tar.gz
- name: mdbook build
run: ./mdbook build
- name: deploy github pages
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: book |
(Well, you might want to try piping |
Cool with binary! how about lintchecker, is there a similar trick? ~~well, bad luck https://github.com/calcit-lang/guidebook/runs/4550674894?check_suite_focus=true ~~ well, finally made it https://github.com/calcit-lang/guidebook/runs/4550839412?check_suite_focus=true |
There are instructions for GH Pages using Travis
https://rust-lang.github.io/mdBook/continuous-integration.html#deploying-your-book-to-github-pages
But I am a fan of using GH Actions.
I have a workflow in use here which I would be happy to add to the guide.
https://github.com/MichaelCurrin/mdbook-quickstart/blob/main/.github/workflows/main.yml
The text was updated successfully, but these errors were encountered: