This action is used to deploy multi-version documentation to GitHub Pages.
We recommend this action to be used in a dedicated job:
jobs:
# Build jobbuild:
permissions:
contents: read # to fetch code (actions/checkout)runs-on: ubuntu-lateststeps:
- name: Deploy to GitHub Pagesid: deploymentuses: rainboyan/deploy-github-pages@v1env:
TOKEN: ${{ secrets.GH_TOKEN }} # GitHub Personal Access TokenVERSION: '1.0.0-SNAPSHOT'# The version of the documentationBRANCH: gh-pages # The branch to deployFOLDER: build/docs # The directory of the generated documentationHere’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.mdAfter deployment is successful, you can access the documentation through the following links,
- https://OWNER.github.io/REPO/1.0.0-SNAPSHOT/
- https://OWNER.github.io/REPO/1.0.x/
- https://OWNER.github.io/REPO/latest/
- https://OWNER.github.io/REPO/snapshot/
| 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 |
The scripts and documentation in this project are released under the MIT License.