Переглянути джерело

Prepared for automatic documentation deploy from travis on npm release.

Sebastian Haas 8 роки тому
батько
коміт
602574efc7
3 змінених файлів з 13 додано та 1 видалено
  1. 2 0
      .travis.yml
  2. 2 1
      Gruntfile.js
  3. 9 0
      bin/publish_docs.sh

+ 2 - 0
.travis.yml

@@ -15,3 +15,5 @@ deploy:
     tags: true
     branch: master
     repo: opensheetmusicdisplay/opensheetmusicdisplay
+after_deploy:
+  - ./bin/publish_docs.sh

+ 2 - 1
Gruntfile.js

@@ -121,11 +121,12 @@ module.exports = function (grunt) {
         typings: {
             install: {}
         },
+        // Class documentation using typedoc
         typedoc: {
             build: {
                 options: {
                     module: 'commonjs',
-                    out: './docs',
+                    out: './build/docs',
                     name: 'opensheetmusicdisplay',
                     target: 'es5',
                     mode: 'file'

+ 9 - 0
bin/publish_docs.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+
+git clone git@github.com:opensheetmusicdisplay/opensheetmusicdisplay.github.io.git
+rsync -a ./build/docs ./opensheetmusicdisplay.github.io.git
+git status
+git add *
+git commit -m "Pushed auto-generated class documentation for $TRAVIS_TAG"
+git tag -a $TRAVIS_TAG -m "Class documentation for $TRAVIS_TAG"
+git push origin master --follow-tags