From 0e568fda4ee1b94b5385ce9d2e5a632de7a92da4 Mon Sep 17 00:00:00 2001 From: Abhik Roy Date: Thu, 12 Oct 2023 17:53:35 +1100 Subject: [PATCH] fix(console): Added fix to test ci Publish job --- .github/workflows/publish-docs-component.yml | 34 +++++++++++--------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish-docs-component.yml b/.github/workflows/publish-docs-component.yml index 139c4531bf..74902d7b3b 100644 --- a/.github/workflows/publish-docs-component.yml +++ b/.github/workflows/publish-docs-component.yml @@ -3,7 +3,7 @@ name: Docs and Publish on: push: branches: - - master + - components/console_simple_init env: DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_DEPLOY_URL_BASE }} @@ -17,7 +17,7 @@ jobs: name: Publish Tag, Release, Docs, Component runs-on: ubuntu-latest # Skip running on forks since it won't have access to secrets - if: github.repository == 'espressif/esp-protocols' + # if: github.repository == 'espressif/esp-protocols' steps: - name: Checkout esp-protocols uses: actions/checkout@v3 @@ -50,13 +50,15 @@ jobs: sudo apt-get -y install doxygen clang python3-pip python -m pip install breathe recommonmark esp-docs==1.4.1 for comp in `ls components`; do - cd $GITHUB_WORKSPACE/docs/${comp} - if [[ "${{ env.BUMP_COMPONENT }}" == "${comp}" ]]; then - echo "Building specific version of ${comp} (${{ env.BUMP_VERSION }})" - ./generate_docs ${{ env.BUMP_VERSION }} - else - echo "Building latest version of ${comp}" - ./generate_docs + if [ -d $GITHUB_WORKSPACE/docs/${comp} ]; then + cd $GITHUB_WORKSPACE/docs/${comp} + if [[ "${{ env.BUMP_COMPONENT }}" == "${comp}" ]]; then + echo "Building specific version of ${comp} (${{ env.BUMP_VERSION }})" + ./generate_docs ${{ env.BUMP_VERSION }} + else + echo "Building latest version of ${comp}" + ./generate_docs + fi fi done - name: Deploying generated docs @@ -67,14 +69,16 @@ jobs: export GIT_VER=$(git describe --always) export GITHUB_REF_NAME=latest for comp in `ls components`; do - echo "Deploying latest of ${comp}" - export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/${comp} - export DOCS_DEPLOY_PATH=$DOCS_DEPLOY_PATH_ORIG/${comp} - cd $GITHUB_WORKSPACE/docs/${comp} - deploy-docs + if [ -d $GITHUB_WORKSPACE/docs/${comp} ]; then + echo "Deploying latest of ${comp}" + export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/${comp} + export DOCS_DEPLOY_PATH=$DOCS_DEPLOY_PATH_ORIG/${comp} + cd $GITHUB_WORKSPACE/docs/${comp} + deploy-docs + fi done; # Deploy docs with version path - if [[ "${{ env.BUMP_VERSION }}" != "" ]]; then + if [[ "${{ env.BUMP_VERSION }}" != "" ]] && [ -d $GITHUB_WORKSPACE/docs/${comp} ]; then echo "Deploying specific version of ${comp} (${{ env.BUMP_VERSION }})" cd $GITHUB_WORKSPACE/docs/${{ env.BUMP_COMPONENT }} export GITHUB_REF_NAME=${{ env.BUMP_VERSION }}