diff --git a/.github/workflows/on-docs-change.yml b/.github/workflows/on-docs-change.yml deleted file mode 100644 index c159eebc62..0000000000 --- a/.github/workflows/on-docs-change.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: on-docs-change - -on: - push: - branches: - - main - paths: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - 'mkdocs.yml' - - '.github/workflows/on-docs-change.yml' - -jobs: - docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v2.3.1 - with: - python-version: '3.8' - - name: Set up NodeJS - uses: actions/setup-node@v2 - with: - node-version: '17.2' - - name: "Setup npm" - run: | - npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" - - name: Install dependencies - run: | - pip install --upgrade pip - pip install -r docs/requirements.txt - npm ci - - name: Setup doc deploy - run: | - git config --global user.name Docs deploy - git config --global user.email docs@dummy.bot.com - - name: Build mkdocs site in "gh-pages" branch and push - run: | - rm -rf site - VERSION="main" - ALIAS="stage" - mkdocs build - mike deploy --push --update-aliases "$VERSION" "$ALIAS" - - name: Build API documentation site - run: | - rm -rf api - npm run docs-generateApiDoc - - name: Release API docs to the main version - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./api - keep_files: true - destination_dir: main/api \ No newline at end of file diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index 02a066be6b..c0505eb3a8 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -56,7 +56,7 @@ jobs: - name: Set RELEASE_VERSION env var run: | RELEASE_VERSION=$(cat packages/commons/package.json | jq '.version' -r) - echo "RELEASE_VERSION=${RELEASE_VERSION:1}" >> $GITHUB_ENV + echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV - name: Install doc generation dependencies run: | pip install --upgrade pip @@ -68,8 +68,9 @@ jobs: - name: Build mkdocs site in "gh-pages" branch and push run: | rm -rf site - VERSION="$RELEASE_VERSION" + VERSION="${{ env.RELEASE_VERSION }}" ALIAS="latest" + echo "Publishing doc for version: $VERSION" mkdocs build mike deploy --push --update-aliases "$VERSION" "$ALIAS" # Set latest version as a default