Add time and space complexity information to various algorithms (#744) #116
This file contains hidden or 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: Generate Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| generate_readme: | |
| name: Markdown Generation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '^1.18' | |
| - name: Install GoDocMD | |
| run: | | |
| go install github.com/tjgurwara99/godocmd@v0.1.3 | |
| - name: Configure Github Action | |
| run: | | |
| git config --global user.name "$GITHUB_ACTOR" | |
| git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| - name: Update README.md file | |
| run: | | |
| godocmd -r -module ./ -w | |
| - name: Commit changes if README.md is different | |
| run: | | |
| if [[ `git status --porcelain` ]]; then | |
| git commit -am "Updated Documentation in README.md" | |
| git push | |
| else | |
| echo "NO CHANGES DETECTED" | |
| fi |