Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

chore: deploy docs on a release #18

Merged
merged 3 commits into from
Mar 11, 2021
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
27 changes: 27 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy API Documentation

on:
release:
types: [published]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2

- name: Install root dependencies
run: npm install --ignore-scripts

- name: Build 🔧
run: |
npm run compile
npm run docs

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/out # The folder the action should deploy.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
run: npm run docs

- name: Test Docs
run: npm run docs-test
run: npm run docs:test
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
[npm-url]: https://www.npmjs.com/package/@opentelemetry/api
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg

[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html
[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html
[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html
[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html
[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js-api/classes/traceapi.html
[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js-api/classes/metricsapi.html
[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js-api/classes/propagationapi.html
[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js-api/classes/contextapi.html

[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p .",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p .",
"compile": "tsc --build",
"docs-test": "linkinator docs/out --silent --skip david-dm.org",
"docs": "typedoc",
"docs:deploy": "gh-pages --dist docs/out",
"docs:test": "linkinator docs/out --silent --skip david-dm.org",
"lint:fix": "eslint src test --ext .ts --fix",
"lint": "eslint src test --ext .ts",
"test:browser": "nyc karma start --single-run",
Expand Down