Skip to content
hard-drive

GitHub Action

ApiGen Docs

2.1 Latest version

ApiGen Docs

hard-drive

ApiGen Docs

Simple Github Action Which Helps You To Generate PHP Code Documentation Website Using ApiGen

Installation

Copy and paste the following snippet into your .yml file.

              

- name: ApiGen Docs

uses: varunsridharan/[email protected]

Learn more about this action in varunsridharan/action-apigen

Choose a version

ApiGen - Github Action

Simple Github Action Which Helps You To Generate PHP Code Documentation Website Using ApiGen

Configuration

Argument Default Description
push_to_branch gh-pages Which Branch To Push
before_cmd null Option to run custom cmd before generating docs
after_cmd null Option to run custom cmd after generating docs
auto_push Yes if Yes then auto pushes files to current repo to the branch defined in push_to_branch
output_folder null Custom output folder if auto_push is disabled
source_folder null Custom source folder if auto_push is disabled
cached_apigen yes Set yes to reduce runtime load

Note Provide A Branch Which is only for the docs. if any other contents in it then all will be deleted DO NOT USE : MASTER

Cached Stats

Cache is useful when running in private repo or if you want to reduce load in github servers

With Cache

With cached enabled workflow takes only around 25s to 35s

https://raw.githubusercontent.com/varunsridharan/action-apigen/master/assets/with-cache.jpg

Without Cache

if cached disabled then workflow takes around 45s to 55s

https://raw.githubusercontent.com/varunsridharan/action-apigen/master/assets/without-cache.jpg

Example Workflow File

Without Local Cache

name: ON_PUSH

on:
  push:
    branches:
      - master

jobs:
  Document_Generator:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: 📝 ApiGen PHP Document Generator
      uses: varunsridharan/[email protected]
      with:
        cached_apigen: 'no'
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Local Cache

name: ON_PUSH

on:
  push:
    branches:
      - master

jobs:
  Document_Generator:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: 📝 ApiGen PHP Document Generator
      uses: varunsridharan/[email protected]
      with:
        cached_apigen: 'yes'
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        

Contribute

If you would like to help, please take a look at the list of issues or the To Do checklist.

License

Our GitHub Actions are available for use and remix under the MIT license.

Copyright

2017 - 2018 Varun Sridharan, varunsridharan.in

If you find it useful, let me know 😉

You can contact me on Twitter or through my email.

Backed By

DigitalOcean JetBrains Tidio Chat