Skip to content

Commit

Permalink
docs: add github action to generate doc (#1522)
Browse files Browse the repository at this point in the history
Added github action install dependencies required to generate
documentation and then run the documentation generator.

As a final step publish the changes to `gh-pages` branch which will be
the source for github documentation.

Adds badge for doc-generator github action

closes: #1494

Co-authored-by: Anshul Guleria <[email protected]>
  • Loading branch information
anshulguleria and Anshul Guleria committed Apr 13, 2020
1 parent 232c458 commit 19c32a2
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
54 changes: 54 additions & 0 deletions .github/workflows/doc-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This is a basic workflow to help you get started with Actions

name: doc-generator

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: install plantuml
run: |
sudo apt-get update -y
sudo apt-get install -y plantuml
- uses: actions/[email protected]

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: setup bundler and install dependencies
run: |
gem install bundler:1.17.3
cd docs
bundle install
- name: link documentation
# gets gh-pages branch and links that to docs/_site directory
run: |
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin gh-pages
git worktree add docs/_site gh-pages
- name: generate documentation
run: |
cd docs
bundle exec jekyll build
- name: push generated documentation
run: |
cd docs/_site
git config user.name "Doc Bot"
git config user.email [email protected]
git add .
git commit -m "[BOT] 🤖 updates doc. No humans needed."
git push
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# ts-jest [![npm version](https://badge.fury.io/js/ts-jest.svg)](https://badge.fury.io/js/ts-jest) [![NPM downloads](https://img.shields.io/npm/dm/ts-jest.svg?style=flat)](https://npmjs.org/package/ts-jest) [![Known Vulnerabilities](https://snyk.io/test/github/kulshekhar/ts-jest/badge.svg)](https://snyk.io/test/github/kulshekhar/ts-jest) [![Coverage Status](https://coveralls.io/repos/github/kulshekhar/ts-jest/badge.svg?branch=master)](https://coveralls.io/github/kulshekhar/ts-jest?branch=master) [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=kulshekhar/ts-jest)](https://dependabot.com) [![Build Status](https://travis-ci.com/kulshekhar/ts-jest.svg?branch=master)](https://travis-ci.com/kulshekhar/ts-jest)
# ts-jest

[![npm version](https://badge.fury.io/js/ts-jest.svg)](https://badge.fury.io/js/ts-jest)
[![NPM downloads](https://img.shields.io/npm/dm/ts-jest.svg?style=flat)](https://npmjs.org/package/ts-jest)
[![Known Vulnerabilities](https://snyk.io/test/github/kulshekhar/ts-jest/badge.svg)](https://snyk.io/test/github/kulshekhar/ts-jest)
[![Coverage Status](https://coveralls.io/repos/github/kulshekhar/ts-jest/badge.svg?branch=master)](https://coveralls.io/github/kulshekhar/ts-jest?branch=master)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=kulshekhar/ts-jest)](https://dependabot.com)
[![Build Status](https://travis-ci.com/kulshekhar/ts-jest.svg?branch=master)](https://travis-ci.com/kulshekhar/ts-jest)
[![doc-generator](https://github.com/kulshekhar/ts-jest/workflows/doc-generator/badge.svg)](https://github.com/kulshekhar/ts-jest/actions)

<img src="./icon.png" align="right" title="ts-jest Logo" width="128" height="128">

Expand Down

0 comments on commit 19c32a2

Please sign in to comment.