Skip to content

Commit

Permalink
ci: split documentation into own workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypicalpro committed Aug 28, 2020
1 parent d99b2d1 commit 53e570a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 36 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,39 +53,3 @@ jobs:

- name: Run Test
run: npm test

documentation:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache NPM
id: cache-node-modules
uses: actions/cache@v1
env:
cache-name: node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Install NPM Dependencies
run: npm ci

- name: Build Documentation
run: npm run apidoc

- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: apidoc # The folder the action should deploy.
42 changes: 42 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Documentation
on:
push:
branches:
- master

jobs:
documentation:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache NPM
id: cache-node-modules
uses: actions/cache@v1
env:
cache-name: node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Install NPM Dependencies
run: npm ci

- name: Build Documentation
run: npm run apidoc

- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: apidoc # The folder the action should deploy.

0 comments on commit 53e570a

Please sign in to comment.