From 4a514ce60e79c9c43071bebf1f16d0ad751a742d Mon Sep 17 00:00:00 2001 From: Vincent Germain Date: Wed, 17 Aug 2022 16:53:04 +0200 Subject: [PATCH] ci: generate reference documentation chore: update README chore: disable default readme ci: support node cache --- ...ull_request.yml => check-pull-request.yml} | 0 .github/workflows/deploy-doc.yml | 67 +++++++++++++++++++ .../{deploy.yml => deploy-package.yml} | 2 +- .../{run_tests.yml => run-tests.yml} | 0 packages/clients/README.md | 2 +- typedoc.json | 3 +- 6 files changed, 71 insertions(+), 3 deletions(-) rename .github/workflows/{check_pull_request.yml => check-pull-request.yml} (100%) create mode 100644 .github/workflows/deploy-doc.yml rename .github/workflows/{deploy.yml => deploy-package.yml} (98%) rename .github/workflows/{run_tests.yml => run-tests.yml} (100%) diff --git a/.github/workflows/check_pull_request.yml b/.github/workflows/check-pull-request.yml similarity index 100% rename from .github/workflows/check_pull_request.yml rename to .github/workflows/check-pull-request.yml diff --git a/.github/workflows/deploy-doc.yml b/.github/workflows/deploy-doc.yml new file mode 100644 index 000000000..336605419 --- /dev/null +++ b/.github/workflows/deploy-doc.yml @@ -0,0 +1,67 @@ +name: Deploy Ref Doc + +on: + # Runs on tags + push: + tags: + - '**' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +# Default to bash +defaults: + run: + shell: bash + +jobs: + # Build job + build: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup PNPM + uses: pnpm/action-setup@v2.2.2 + - name: Setup Node + uses: actions/setup-node@v3.3.0 + with: + node-version: 17 + check-latest: true + cache: 'pnpm' + - name: Setup Pages + id: pages + uses: actions/configure-pages@v1 + - name: Install dependencies + run: pnpm install + - name: Build doc + run: pnpm run doc + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: ./docs + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-20.04 + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy-package.yml similarity index 98% rename from .github/workflows/deploy.yml rename to .github/workflows/deploy-package.yml index 7d111ead3..7fb69f900 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy-package.yml @@ -1,4 +1,4 @@ -name: Deploy +name: Deploy to NPM on: workflow_dispatch: diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run-tests.yml similarity index 100% rename from .github/workflows/run_tests.yml rename to .github/workflows/run-tests.yml diff --git a/packages/clients/README.md b/packages/clients/README.md index 3bc7b1bd2..7858fa5a2 100644 --- a/packages/clients/README.md +++ b/packages/clients/README.md @@ -3,7 +3,7 @@ This SDK enables you to interact with Scaleway APIs. **🔗  Important links:** -* Reference documentation (soon) +* [Reference documentation](https://scaleway.github.io/scaleway-sdk-js) * [Example projects](https://github.com/scaleway/scaleway-sdk-js/tree/master/examples) * [Developers website](https://developers.scaleway.com) (API documentation) diff --git a/typedoc.json b/typedoc.json index 418e08d7f..aa45a0b8a 100644 --- a/typedoc.json +++ b/typedoc.json @@ -6,5 +6,6 @@ "out": "docs", "excludeInternal": true, "excludePrivate": true, - "excludeProtected": true + "excludeProtected": true, + "readme": "none" }