• Stars
    star
    249
  • Rank 162,987 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

GitHub Actions for mdBook (rust-lang/mdBook) ⚡️ Setup mdBook quickly and build your site fast. Linux (Ubuntu), macOS, and Windows are supported.

GitHub Actions for mdBook

GitHub Actions for mdBook thumbnail

license release GitHub release date Test CodeFactor codecov Release Feed

rust-lang/mdBook Setup Action.

We can run mdBook on a virtual machine of GitHub Actions by this mdBook action. Linux, macOS, and Windows are supported.

OS (runs-on) ubuntu-20.04, ubuntu-22.04 macos-latest windows-2019
Support ✅️ ✅️ ✅️

Table of Contents

Getting Started

⭐️ Create your workflow

An example workflow .github/workflows/gh-pages.yml with GitHub Actions for GitHub Pages. For the first deployment, we have to do this operation: First Deployment with GITHUB_TOKEN - peaceiris/actions-gh-pages

peaceiris/actions-gh-pages - GitHub

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-version: '0.4.10'
          # mdbook-version: 'latest'

      - 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

Options

⭐️ Use the latest version of mdBook

Set mdbook-version: 'latest' to use the latest version of mdBook.

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

This action fetches the latest version of mdBook by mdbook — Homebrew Formulae

Tips

⭐️ Read mdBook version from file

How to sync a mdBook version between a Docker Compose and a GitHub Actions workflow via .env file.

Write a MDBOOK_VERSION to the .env file like the following and push it to a remote branch.

MDBOOK_VERSION=0.4.10

Next, add a step to read a mdBook version from the .env file.

    - name: Read .env
      id: mdbook-version
      run: |
        . ./.env
        echo "::set-output name=MDBOOK_VERSION::${MDBOOK_VERSION}"

    - name: Setup mdBook
      uses: peaceiris/actions-mdbook@v1
      with:
        mdbook-version: '${{ steps.mdbook-version.outputs.MDBOOK_VERSION }}'

Here is a docker-compose.yml example.

version: '3'

services:
  mdbook:
    container_name: mdbook
    image: "peaceiris/mdbook:v${MDBOOK_VERSION}"
    # image: "peaceiris/mdbook:v${MDBOOK_VERSION}-rust"  # Large image including Rust compiler
    stdin_open: true
    tty: true
    ports:
      - 3000:3000
      - 3001:3001
    volumes:
      - ${PWD}:/book
    command:
      - serve
      - --hostname
      - '0.0.0.0'

The alpine base mdBook Docker image is provided on the following repository.

peaceiris/docker-mdbook: mdBook Alpine Base Docker Image.

CHANGELOG

License

About Maintainer

Maintainer Notes

Run npm and git commit commands on a container.

On Host

# Docker
make build
make run
make run cmd="env"
make test
make commit msg="chore: Add Makefile"

# Release
./release.sh

More Repositories

1

actions-gh-pages

GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.
TypeScript
3,940
star
2

actions-hugo

GitHub Actions for Hugo ⚡️ Setup Hugo quickly and build your site fast. Hugo extended, Hugo Modules, Linux (Ubuntu), macOS, and Windows are supported.
TypeScript
1,217
star
3

emoji-ime-dictionary

日本語で絵文字入力をするための IME 追加辞書 📙 Google 日本語入力などで日本語から絵文字への変換を可能にする IME 拡張辞書
Python
296
star
4

mkdocs-material-boilerplate

MkDocs Material Boilerplate (Starter Kit) - Deploy documentation to hosting platforms (Netlify, GitHub Pages, GitLab Pages, and AWS Amplify Console) with Docker, pipenv, and GitHub Actions.
Python
98
star
5

actions-label-commenter

Label Commenter Action: Label triggered GitHub Action for posting a template comment, and automatically open/close/lock/unlock issues, pull-requests, and discussions.
TypeScript
79
star
6

google-ime-dictionary

日英変換・英語略語展開のための IME 追加辞書 📙 日本語から英語への和英変換や英語略語の展開を Google 日本語入力や ATOK などで可能にする IME 拡張辞書
Shell
65
star
7

hugo-theme-iris

Hugo IRIS Theme - Portfolio and Blog
HTML
60
star
8

hugo-extended-docker

Debian Based Docker Image for Hugo (Hugo extended and Hugo Modules)
Makefile
51
star
9

docker-mdbook

mdBook Alpine Base Docker Image.
Dockerfile
31
star
10

actions-suggest-related-links

A GitHub Action to suggest related or similar issues, documents, and links. Based on the power of NLP and fastText.
TypeScript
29
star
11

actions-github-pages

The v3 implementation of GitHub Actions for GitHub Pages.
TypeScript
12
star
12

actions-pixela

GitHub Actions for Pixela (a-know/pi) - a-know/pi Setup Action. Linux (Ubuntu), macOS, and Windows are supported.
TypeScript
12
star
13

actions-self-hosted-runners

GitHub Actions self-hosted runner on VirtualBox with Vagrant.
Shell
10
star
14

actions-broken-link-checker

GitHub Actions for broken-link-checker (Find broken links, missing images, etc in your HTML)
Dockerfile
8
star
15

actions-pipenv

GitHub Actions for Python project with pipenv
Dockerfile
6
star
16

actions-hugo-link-check

GitHub Actions to check broken links for Hugo
Dockerfile
5
star
17

hugo-mod-bulma

Bulma packaged as a Hugo Module.
5
star
18

hugo-mod-mermaidjs

mermaid-js/mermaid packaged as a Hugo Module.
4
star
19

hugo-mod-mathjax

MathJax packaged as a Hugo Module.
4
star
20

hugo-mod-revealjs

reveal.js packaged as a Hugo Module.
3
star
21

actions-mkdocs-gh-pages

GitHub Actions for MkDocs and GitHub Pages - Build markdown documentation with Material for MkDocs and deploy to GitHub Pages automatically
Shell
3
star
22

docker-latex

Docker image for LaTeX
Dockerfile
3
star
23

actions-muffet

GitHub Actions for muffet (Fast website link checker in Go)
Dockerfile
3
star
24

actions-liche

GitHub Actions for liche (Fast Link Checker for Markdown and HTML in Go)
Dockerfile
3
star
25

peaceiris

About peaceiris
2
star
26

actions-export-envs

Exporting ACTIONS_RUNTIME_TOKEN and ACTIONS_CACHE_URL to enable the Docker layer caching on GitHub Actions.
Shell
2
star
27

mlops

MLOps and DevOps Playground
2
star
28

Hatena-Intern-2020

Go
1
star
29

actions-utils

Utilities for the GitHub Actions.
JavaScript
1
star
30

test-sphinx

Python
1
star
31

actions-github-app-token

A GitHub Action to generate a token for GitHub Apps
TypeScript
1
star
32

test-hugo-external-repo

Test repo: Deploy from https://github.com/peaceiris/hugo-test-project
HTML
1
star
33

test-docusaurus

GitHub Pages and GitHub Actions example for facebook/docusaurus https://test-docusaurus.peaceiris.com/
JavaScript
1
star
34

gatsby-test

Log: https://github.com/peaceiris/gatsby-test/commits/gh-pages
JavaScript
1
star
35

netlify-search-function

Go
1
star
36

contents

Blog contents
1
star
37

investigate-hugo-hanging

A repository to investigate a hanging of Hugo on GitHub Actions
HTML
1
star
38

test-mdbook

https://github.com/peaceiris/test-mdbook/tree/gh-pages
Shell
1
star