Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(console): Added fix to test ci Publish job #3

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions .github/workflows/publish-docs-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
Loading