Skip to content

rainboyan/deploy-github-pages

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Deploy Multi-Version Documentation to GitHub Pages

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages