docs(config): correction for maxAge #178
This file contains 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: Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
build_api: | |
name: Build API | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '8.x' | |
- name: Install dependencies | |
run: | | |
npm install -g \ | |
esdoc \ | |
esdoc-node \ | |
esdoc-standard-plugin \ | |
esdoc-publish-html-plugin \ | |
esdoc-lint-plugin \ | |
esdoc-coverage-plugin \ | |
esdoc-accessor-plugin \ | |
esdoc-type-inference-plugin \ | |
esdoc-external-ecmascript-plugin \ | |
esdoc-brand-plugin \ | |
esdoc-undocumented-identifier-plugin \ | |
esdoc-unexported-identifier-plugin \ | |
esdoc-integrate-test-plugin \ | |
esdoc-integrate-manual-plugin \ | |
esdoc-ecmascript-proposal-plugin | |
- name: Build API documentation | |
run: | | |
mkdir repos | |
cd repos | |
git clone --depth=1 https://github.com/os-js/osjs-client.git | |
(cd osjs-client && esdoc) | |
git clone --depth=1 https://github.com/os-js/osjs-common.git | |
(cd osjs-common && esdoc) | |
git clone --depth=1 https://github.com/os-js/osjs-dialogs.git | |
(cd osjs-dialogs && esdoc) | |
git clone --depth=1 https://github.com/os-js/osjs-event-emitter.git | |
(cd osjs-event-emitter && esdoc) | |
git clone --depth=1 https://github.com/os-js/osjs-gui.git | |
(cd osjs-gui && esdoc) | |
git clone --depth=1 https://github.com/os-js/osjs-panels.git | |
(cd osjs-panels && esdoc) | |
git clone --depth=1 https://github.com/os-js/osjs-server.git | |
(cd osjs-server && esdoc) | |
git clone --depth=1 https://github.com/os-js/osjs-widgets.git | |
(cd osjs-widgets && esdoc) | |
- name: Upload data | |
uses: actions/upload-artifact@v3 | |
with: | |
name: api | |
path: repos | |
retention-days: 1 | |
build_manual: | |
name: Build Manual | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '8.x' | |
- name: Install dependencies | |
run: npm install | |
- name: Build manual | |
run: npx gitbook build | |
- name: Upload data | |
uses: actions/upload-artifact@v3 | |
with: | |
name: manual | |
path: _book | |
retention-days: 1 | |
deploy: | |
needs: [build_api, build_manual] | |
if: github.actor == 'andersevenrud' || github.actor == 'os-js' | |
name: Build and deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download api data | |
uses: actions/download-artifact@v3 | |
with: | |
name: api | |
path: repos | |
- name: Download manual data | |
uses: actions/download-artifact@v3 | |
with: | |
name: manual | |
path: _book | |
- name: Create dist | |
run: | | |
mkdir -p dist/api | |
echo "${{ secrets.GA_CONTENTS }}" > "dist/${{ secrets.GA_FILENAME }}" | |
cp -r _book/* dist/ | |
cp -r shims/* dist/ | |
cp -r repos/osjs-client/doc dist/api/osjs-client | |
cp -r repos/osjs-common/doc dist/api/osjs-common | |
cp -r repos/osjs-dialogs/doc dist/api/osjs-dialogs | |
cp -r repos/osjs-event-emitter/doc dist/api/osjs-event-emitter | |
cp -r repos/osjs-gui/doc dist/api/osjs-gui | |
cp -r repos/osjs-panels/doc dist/api/osjs-panels | |
cp -r repos/osjs-server/doc dist/api/osjs-server | |
cp -r repos/osjs-widgets/doc dist/api/osjs-widgets | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
cname: manual.os-js.org |