Skip to content

Deploy multi-version documentation to GitHub Pages

Actions
A GitHub Action to deploy multi-version documentation to GitHub Pages
v1.1.0
Latest
StarΒ (1)

Tags

Β (1)

Deploy Multi-Version Documentation to GitHub Pages πŸš€

Release

This action is used to deploy multi-version documentation to GitHub Pages.

Usage

We recommend this action to be used in a dedicated job:

jobs:
  # Build job
  build:
    permissions:
      contents: read  #  to fetch code (actions/checkout)
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: rainboyan/deploy-github-pages@v1
        env:
          TOKEN: ${{ secrets.GH_TOKEN }}    # GitHub Personal Access Token
          VERSION: '1.0.0-SNAPSHOT'         # The version of the documentation
          BRANCH: gh-pages                  # The branch to deploy
          FOLDER: build/docs                # The directory of the generated documentation

Here’s the directory structure for the documentation,

.
β”œβ”€β”€ 1.0.0-SNAPSHOT
β”‚Β Β  β”œβ”€β”€ ..
β”‚Β Β  └── index.html
β”œβ”€β”€ 1.0.x
β”‚Β Β  β”œβ”€β”€ ..
β”‚Β Β  └── index.html
β”œβ”€β”€ latest
β”‚Β Β  β”œβ”€β”€ ..
β”‚Β Β  └── index.html
β”œβ”€β”€ snapshot
β”‚Β Β  β”œβ”€β”€ ..
β”‚Β Β  └── index.html
└── README.md

After deployment is successful, you can access the documentation through the following links,

Environment Variables 🌎

Variable Description
TOKEN GitHub Personal Access Token
VERSION The version of the documentation, if empty it will deploy to the ROOT
BRANCH The branch to deploy
FOLDER The directory of the generated documentation
CNAME This will create a CNAME file

License

The scripts and documentation in this project are released under the MIT License.

Links

Deploy multi-version documentation to GitHub Pages is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

A GitHub Action to deploy multi-version documentation to GitHub Pages
v1.1.0
Latest

Tags

Β (1)

Deploy multi-version documentation to GitHub Pages is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.