diff --git a/.circleci/config.yml b/.circleci/config.yml index e1dc9feb5b..2a72e5aea3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..bbc666ce6d --- /dev/null +++ b/.github/workflows/docs.yml @@ -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. \ No newline at end of file