loading...

Automatically version and deploy your documentation with github actions

bobrown101 profile image Brady Brown ・1 min read

Hey guys,

I created two github actions that allow you to automatically version and deploy your documentation.

You get the simplicity of keeping your documentation versioned in git, without the annoyance of having huge PR's due to auto-generated-doc updates.

Right now the only hosting provider implemented is netlfiy, however more are planned.

https://github.com/bobrown101/version-docs

https://github.com/bobrown101/deploy-branch

Here is an example of how you would use it within your github repo:

name: Version and Deploy docs
on: push
jobs:
  CI:
    runs-on: ubuntu-latest
    env:
      CI: true
    steps:
    - name: Generate docs
      run: yarn docs
    - name: Version docs
      uses: bobrown101/version-docs@v2.1.0
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        doc-location: docs
        doc-branch: docs
    - name: Deploy docs
      uses: bobrown101/deploy-branch@v2.0.0
      with:
        provider: NETLIFY
        netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
        netlify-site-id: <<siteid>>
        branch: docs
        github-token: ${{ secrets.GITHUB_TOKEN }}

I would appreciate any feedback and stars on github.

Thanks,

Brady

Discussion

pic
Editor guide
Collapse
bobrown101 profile image
Brady Brown Author

Here is an example of the generated docs hosted on netlify:
ge-fnm-action-object.netlify.com/