Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: deploy docs using github action #1051

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.