Skip to content

Commit

Permalink
chore: deploy docs using github action (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan authored May 13, 2020
1 parent e83174f commit 7ccf1d0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 31 deletions.
31 changes: 0 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 noreply@opentelemetry.io
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
Expand Down Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/docs.yml
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.

0 comments on commit 7ccf1d0

Please sign in to comment.