-
Notifications
You must be signed in to change notification settings - Fork 836
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: deploy docs using github action
- Loading branch information
Showing
2 changed files
with
27 additions
and
31 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 |
---|---|---|
|
@@ -140,35 +140,12 @@ jobs: | |
- run: | ||
name: Docs tests | ||
command: npm run docs-test | ||
- persist_to_workspace: | ||
root: packages/opentelemetry-api/docs | ||
paths: | ||
- out | ||
- run: | ||
name: Install minimal modules to lint examples | ||
command: npm i --no-save eslint eslint-plugin-import eslint-config-airbnb-base | ||
- run: | ||
name: Lint examples | ||
command: npm run lint:examples | ||
docs-deploy: | ||
docker: | ||
- image: node:12 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: packages/opentelemetry-api/docs | ||
- run: | ||
name: Install and configure dependencies | ||
command: | | ||
npm install --silent --no-save gh-pages | ||
git config user.email [email protected] | ||
git config user.name "ci-build" | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "1d:a3:60:b5:b4:8d:e7:8a:96:ce:6a:0a:e9:58:4c:54" | ||
- run: | ||
name: Deploy docs to gh-pages branch | ||
command: gh-pages --dist packages/opentelemetry-api/docs/out | ||
node8: | ||
docker: | ||
- image: node:8 | ||
|
@@ -207,14 +184,6 @@ workflows: | |
filters: | ||
branches: | ||
only: /.*/ | ||
- docs-deploy: | ||
requires: | ||
- lint_&_docs | ||
filters: | ||
tags: | ||
only: /^v\d+\.\d+\.\d$/ | ||
branches: | ||
ignore: /.*/ | ||
- node8 | ||
- node10 | ||
- node12 | ||
|
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,27 @@ | ||
name: Deploy docs on a new release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Install and Build 🔧 | ||
run: | | ||
npm install --ignore-scripts | ||
npx lerna bootstrap --scope @opentelemetry/api --include-filtered-dependencies | ||
npm run docs | ||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-deploy-action@releases/v3 | ||
with: | ||
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: packages/opentelemetry-api/docs/out # The folder the action should deploy. |