-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0226718
commit e0af20d
Showing
10 changed files
with
158 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Dead Links | ||
description: Run Dead Links Tests | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install deps | ||
run: npm ci | ||
shell: bash | ||
- name: Prepare documentation | ||
run: npm run doc:prepare | ||
shell: bash | ||
- name: Install docs repositories | ||
run: npx kuzdoc iterate-repos:install --repos_path doc/framework/.repos/ | ||
shell: bash | ||
- name: Link kuzdoc | ||
run: npx kuzdoc framework:link -d /official-plugins/device-manager/1/ -v 1 | ||
shell: bash | ||
- name: Install typhoeus | ||
run: sudo gem install typhoeus | ||
shell: bash | ||
- name: Run dead links tests | ||
run: cd doc/framework/ && HYDRA_MAX_CONCURRENCY=20 ruby .ci/dead-links.rb -p src/official-plugins/device-manager/1/ | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Deploy Documentation | ||
description: Build doc, upload it to S3 and invalidate Cloudfront cache | ||
|
||
inputs: | ||
AWS_ACCESS_KEY_ID: | ||
description: AWS Access key ID | ||
required: true | ||
AWS_SECRET_ACCESS_KEY: | ||
description: AWS secret key | ||
required: true | ||
S3_BUCKET: | ||
description: S3 bucket name | ||
required: true | ||
CLOUDFRONT_ID: | ||
description: Cloudfront distribution ID | ||
required: true | ||
REGION: | ||
description: AWS default region | ||
required: true | ||
FRAMEWORK_BRANCH: | ||
description: Documentation framework branch to use | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install AWS CLI | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install python python-pip | ||
pip install awscli --upgrade --user | ||
shell: bash | ||
- name: Build documentation | ||
run: | | ||
rm -rf doc/framework | ||
npm install --production=false | ||
npm run doc:prepare | ||
npm run doc:build | ||
env: | ||
NODE_ENV: production | ||
FRAMEWORK_BRANCH: ${{ inputs.FRAMEWORK_BRANCH }} | ||
shell: bash | ||
- name: Deploy documentation | ||
run: | | ||
npm run doc:upload | ||
npm run doc:cloudfront | ||
env: | ||
AWS_DEFAULT_REGION: ${{ inputs.REGION }} | ||
AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ inputs.AWS_SECRET_ACCESS_KEY }} | ||
S3_BUCKET: ${{ inputs.S3_BUCKET }} | ||
CLOUDFRONT_DISTRIBUTION_ID: ${{ inputs.CLOUDFRONT_ID }} | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,24 @@ jobs: | |
with: | ||
node-version: "12" | ||
- uses: ./.github/actions/functional-test | ||
|
||
documentation-dead-links: | ||
name: Dead links | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: "12" | ||
- uses: ./.github/actions/dead-links |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,53 @@ jobs: | |
with: | ||
node-version: "12" | ||
- uses: ./.github/actions/functional-test | ||
|
||
documentation-dead-links: | ||
name: Dead links | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: "12" | ||
- uses: ./.github/actions/dead-links | ||
|
||
documentation-production: | ||
name: Deployment Doc Prod | ||
runs-on: ubuntu-18.04 | ||
needs: [functional-tests, documentation-dead-links] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: "12" | ||
- uses: ./.github/actions/doc-deploy | ||
with: | ||
REGION: us-west-2 | ||
S3_BUCKET: docs.kuzzle.io | ||
CLOUDFRONT_ID: E3D6RP0POLCJMM | ||
FRAMEWORK_BRANCH: master | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
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
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
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
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
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
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