{"id":13533965,"url":"https://github.com/peaceiris/actions-mdbook","last_synced_at":"2025-05-15T13:04:27.317Z","repository":{"id":36689689,"uuid":"224423059","full_name":"peaceiris/actions-mdbook","owner":"peaceiris","description":"GitHub Actions for mdBook (rust-lang/mdBook) ⚡️ Setup mdBook quickly and build your site fast. Linux (Ubuntu), macOS, and Windows are supported.","archived":false,"fork":false,"pushed_at":"2025-04-15T02:36:12.000Z","size":2014,"stargazers_count":309,"open_issues_count":20,"forks_count":24,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T03:54:33.839Z","etag":null,"topics":["actions","github-actions","mdbook","rust"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/mdbook-action","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peaceiris.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"peaceiris","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-11-27T12:12:53.000Z","updated_at":"2025-03-22T19:25:07.000Z","dependencies_parsed_at":"2024-11-18T09:21:54.871Z","dependency_job_id":null,"html_url":"https://github.com/peaceiris/actions-mdbook","commit_stats":{"total_commits":594,"total_committers":5,"mean_commits":118.8,"dds":0.5892255892255892,"last_synced_commit":"a689c82f6bdd0e2cb2dfca000c0d6ea86a17094a"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peaceiris%2Factions-mdbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peaceiris%2Factions-mdbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peaceiris%2Factions-mdbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peaceiris%2Factions-mdbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peaceiris","download_url":"https://codeload.github.com/peaceiris/actions-mdbook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003954,"owners_count":21196794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","github-actions","mdbook","rust"],"created_at":"2024-08-01T07:01:24.845Z","updated_at":"2025-04-15T03:54:38.993Z","avatar_url":"https://github.com/peaceiris.png","language":"TypeScript","readme":"\u003ch2 align=\"center\"\u003e\nGitHub Actions for mdBook\n\u003c/h2\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/peaceiris/actions-mdbook/main/images/ogp.jpg\" alt=\"GitHub Actions for mdBook thumbnail\" width=\"500px\"\u003e\n\u003c/div\u003e\n\n[![license](https://img.shields.io/github/license/peaceiris/actions-mdbook.svg)](https://github.com/peaceiris/actions-mdbook/blob/main/LICENSE)\n[![release](https://img.shields.io/github/release/peaceiris/actions-mdbook.svg)](https://github.com/peaceiris/actions-mdbook/releases/latest)\n[![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-mdbook.svg)](https://github.com/peaceiris/actions-mdbook/releases)\n![Test](https://github.com/peaceiris/actions-mdbook/workflows/Test/badge.svg?branch=main\u0026event=push)\n[![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-mdbook/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-mdbook)\n[![codecov](https://codecov.io/gh/peaceiris/actions-mdbook/branch/main/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-mdbook)\n[![Release Feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/actions-mdbook/releases.atom)\n\n[rust-lang/mdBook] Setup Action.\n\n[rust-lang/mdBook]: https://github.com/rust-lang/mdBook\n\nWe can run **mdBook** on a virtual machine of **GitHub Actions** by this mdBook action.\nLinux, macOS, and Windows are supported.\n\n| OS (runs-on) | ubuntu-20.04, ubuntu-22.04 | macos-latest | windows-2019 |\n|---|:---:|:---:|:---:|\n| Support | ✅️ | ✅️ | ✅️ |\n\n\n\n## Table of Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [Getting Started](#getting-started)\n  - [⭐️ Create your workflow](#%EF%B8%8F-create-your-workflow)\n- [Options](#options)\n  - [⭐️ Use the latest version of mdBook](#%EF%B8%8F-use-the-latest-version-of-mdbook)\n- [Tips](#tips)\n  - [⭐️ Read mdBook version from file](#%EF%B8%8F-read-mdbook-version-from-file)\n- [CHANGELOG](#changelog)\n- [License](#license)\n- [About Maintainer](#about-maintainer)\n- [Maintainer Notes](#maintainer-notes)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\n\n## Getting Started\n\n### ⭐️ Create your workflow\n\nAn example workflow `.github/workflows/gh-pages.yml` with [GitHub Actions for GitHub Pages].\nFor the first deployment, we have to do this operation: [First Deployment with `GITHUB_TOKEN` - peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-first-deployment-with-github_token)\n\n[GitHub Actions for GitHub Pages]: https://github.com/peaceiris/actions-gh-pages\n\n[![peaceiris/actions-gh-pages - GitHub](https://gh-card.dev/repos/peaceiris/actions-gh-pages.svg?fullname)](https://github.com/peaceiris/actions-gh-pages)\n\n```yaml\nname: github pages\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  deploy:\n    runs-on: ubuntu-20.04\n    concurrency:\n      group: ${{ github.workflow }}-${{ github.ref }}\n    steps:\n      - uses: actions/checkout@v2\n\n      - name: Setup mdBook\n        uses: peaceiris/actions-mdbook@v2\n        with:\n          mdbook-version: '0.4.10'\n          # mdbook-version: 'latest'\n\n      - run: mdbook build\n\n      - name: Deploy\n        uses: peaceiris/actions-gh-pages@v3\n        if: ${{ github.ref == 'refs/heads/main' }}\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./book\n```\n\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"#table-of-contents\"\u003eBack to TOC ☝️\u003c/a\u003e\n\u003c/div\u003e\n\n\n\n## Options\n\n### ⭐️ Use the latest version of mdBook\n\nSet `mdbook-version: 'latest'` to use the latest version of mdBook.\n\n```yaml\n- name: Setup mdBook\n  uses: peaceiris/actions-mdbook@v2\n  with:\n    mdbook-version: 'latest'\n```\n\nThis action fetches the latest version of mdBook by [mdbook — Homebrew Formulae](https://formulae.brew.sh/formula/mdbook)\n\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"#table-of-contents\"\u003eBack to TOC ☝️\u003c/a\u003e\n\u003c/div\u003e\n\n\n\n## Tips\n\n### ⭐️ Read mdBook version from file\n\nHow to sync a mdBook version between a Docker Compose and a GitHub Actions workflow via `.env` file.\n\nWrite a `MDBOOK_VERSION` to the `.env` file like the following and push it to a remote branch.\n\n```sh\nMDBOOK_VERSION=0.4.10\n```\n\nNext, add a step to read a mdBook version from the `.env` file.\n\n```yaml\n    - name: Read .env\n      id: mdbook-version\n      run: |\n        . ./.env\n        echo \"::set-output name=MDBOOK_VERSION::${MDBOOK_VERSION}\"\n\n    - name: Setup mdBook\n      uses: peaceiris/actions-mdbook@v2\n      with:\n        mdbook-version: '${{ steps.mdbook-version.outputs.MDBOOK_VERSION }}'\n```\n\nHere is a `docker-compose.yml` example.\n\n```yaml\nversion: '3'\n\nservices:\n  mdbook:\n    container_name: mdbook\n    image: \"peaceiris/mdbook:v${MDBOOK_VERSION}\"\n    # image: \"peaceiris/mdbook:v${MDBOOK_VERSION}-rust\"  # Large image including Rust compiler\n    stdin_open: true\n    tty: true\n    ports:\n      - 3000:3000\n      - 3001:3001\n    volumes:\n      - ${PWD}:/book\n    command:\n      - serve\n      - --hostname\n      - '0.0.0.0'\n```\n\nThe alpine base mdBook Docker image is provided on the following repository.\n\n\u003e [peaceiris/docker-mdbook: mdBook Alpine Base Docker Image.](https://github.com/peaceiris/docker-mdbook)\n\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"#table-of-contents\"\u003eBack to TOC ☝️\u003c/a\u003e\n\u003c/div\u003e\n\n\n\n## CHANGELOG\n\n- [CHANGELOG.md](CHANGELOG.md)\n\n\n\n## License\n\n- [MIT License - peaceiris/actions-mdbook]\n\n[MIT License - peaceiris/actions-mdbook]: https://github.com/peaceiris/actions-mdbook/blob/main/LICENSE\n\n\n\n## About Maintainer\n\n- [peaceiris homepage](https://peaceiris.com/)\n- [GitHub Action Hero: Shohei Ueda - The GitHub Blog](https://github.blog/2020-03-22-github-action-hero-shohei-ueda/)\n\n\n\n## Maintainer Notes\n\nRun `npm` and `git commit` commands on a container.\n\n**On Host**\n\n```sh\n# Docker\nmake build\nmake run\nmake run cmd=\"env\"\nmake test\nmake commit msg=\"chore: Add Makefile\"\n\n# Release\n./release.sh\n```\n\n\n\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"#table-of-contents\"\u003eBack to TOC ☝️\u003c/a\u003e\n\u003c/div\u003e\n","funding_links":["https://github.com/sponsors/peaceiris"],"categories":["Development tools","Community Resources","开发工具 Development tools","TypeScript"],"sub_categories":["Build system","Frontend Tools","构建系统 Build system"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeaceiris%2Factions-mdbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeaceiris%2Factions-mdbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeaceiris%2Factions-mdbook/lists"}