DEV Community

Brady Brown
Brady Brown

Posted on

Automatically version and deploy your documentation with github actions

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

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

While many AI coding tools operate as simple command-response systems, Qodo Gen 1.0 represents the next generation: autonomous, multi-step problem-solving agents that work alongside you.

Read full post →

Top comments (1)

Collapse
 
bobrown101 profile image
Brady Brown

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

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay