diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 0000000..4470ba4 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,26 @@ +name: Build OpenAPI docs +on: + - push + # - pull_request +jobs: + docs-build: + runs-on: ubuntu-latest + # env: + # TRAVIS_BRANCH: ${{ github.event.number }} + # a trick that builds docs for PRs (with PR number). Does not work for PRs from forks. + steps: + - name: Setup Node.js environment + uses: actions/setup-node@v2.5.1 + with: + node-version: 14.x + # Comes with npm 6. For newer Node, encountered: https://github.com/npm/cli/issues/3359 + - run: npm install -g @redocly/openapi-cli && npm install -g redoc-cli + - run: npm install -g gh-openapi-docs + - name: Check out repository code + uses: actions/checkout@v2 + - run: gh-openapi-docs + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4.2.2 + with: + branch: gh-pages + folder: . diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b567925..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -jobs: - include: - - stage: build_docs - language: node_js - node_js: - - "12" - before_script: - - npm install -g @redocly/openapi-cli \ - && npm install -g redoc-cli - - npm install -g gh-openapi-docs - script: - - gh-openapi-docs - deploy: - provider: pages - skip-cleanup: true - keep_history: true - github-token: $GITHUB_TOKEN - on: - all_branches: true