From 36ed4fb5f12c6bffc49311469089b9114dad822b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Mon, 1 Apr 2024 11:11:57 +0300 Subject: [PATCH] Fix indent. --- .editorconfig | 3 ++ .github/workflows/update-docs.yml | 83 ++++++++++++++++--------------- 2 files changed, 45 insertions(+), 41 deletions(-) diff --git a/.editorconfig b/.editorconfig index 25437d3b..c2b51d9a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,3 +9,6 @@ end_of_line = lf insert_final_newline = true indent_style = space indent_size = 4 + +[*.yml] +indent_size = 2 diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 17205f1c..47cd2bd8 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -1,52 +1,53 @@ name: Update docs on: - workflow_dispatch: + workflow_dispatch: release: - types: [released] - pull_request: + types: [released] + pull_request: branches: [main, development, feat/*] permissions: - contents: write - -jobs: + contents: write + + jobs: update-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/checkout@v4 - with: - ref: "gh-pages" - repository: ${{ github.event.pull_request.head.repo.full_name }} - path: "docs" - - - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: https://registry.npmjs.org/ - + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/checkout@v4 + with: + ref: "gh-pages" + repository: ${{ github.event.pull_request.head.repo.full_name }} + path: "docs" + + - uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + - name: Install dependencies - run: | - npm install -g typedoc - + run: | + npm install -g typedoc + - name: Re-generate docs run: | - MAJOR_VERSION=v$(node -p "require('./package.json').version.split('.')[0]") - DOCS_OUTPUT_FOLDER=${GITHUB_WORKSPACE}/docs/${MAJOR_VERSION} - - rm -rf $DOCS_OUTPUT_FOLDER - mkdir -p $DOCS_OUTPUT_FOLDER - - npm ci - typedoc --out $DOCS_OUTPUT_FOLDER src/index.ts --includeVersion - - cd ${GITHUB_WORKSPACE}/docs - - # See: https://github.com/actions/checkout/blob/main/README.md#push-a-commit-using-the-built-in-token - git config user.name github-actions - git config user.email github-actions@github.com - git add . - git commit -m "Re-generated docs." --allow-empty - git push + MAJOR_VERSION=v$(node -p "require('./package.json').version.split('.')[0]") + DOCS_OUTPUT_FOLDER=${GITHUB_WORKSPACE}/docs/${MAJOR_VERSION} + + rm -rf $DOCS_OUTPUT_FOLDER + mkdir -p $DOCS_OUTPUT_FOLDER + + npm ci + typedoc --out $DOCS_OUTPUT_FOLDER src/index.ts --includeVersion + + cd ${GITHUB_WORKSPACE}/docs + + # See: https://github.com/actions/checkout/blob/main/README.md#push-a-commit-using-the-built-in-token + git config user.name github-actions + git config user.email github-actions@github.com + git add . + git commit -m "Re-generated docs." --allow-empty + git push + \ No newline at end of file