2.1.6 #123
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish API docs | |
on: | |
# For some reason, `on: release: ...` didn't work with `nektos/act` | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
# for re-running on old tags | |
workflow_dispatch: | |
inputs: | |
publish_version: | |
required: true | |
type: string | |
permissions: {} | |
jobs: | |
build: | |
permissions: | |
contents: write # for git push (s0/git-publish-subdir-action) | |
name: Publish API Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout release tag | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.GITHUB_REF }} | |
- name: Checkout GitHub pages branch | |
uses: actions/checkout@v4 | |
with: | |
path: gh-pages | |
ref: gh-pages | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2' | |
bundler-cache: true | |
- name: Build API docs | |
run: | | |
bundle exec rake site:fetch_latest apidocs:gen_version["${{ inputs.publish_version || env.GITHUB_REF }}"] | |
- name: Commit changes as last committer | |
run: | | |
git config --global user.name rmosolgo | |
git config --global user.email [email protected] | |
git status | |
bundle exec rake site:commit_changes | |
git status | |
- name: Deploy to GitHub pages via gh-pages branch | |
uses: s0/git-publish-subdir-action@master | |
env: | |
REPO: self | |
BRANCH: gh-pages | |
FOLDER: gh-pages | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |