mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 18:27:31 +02:00
ci(common): Fail CI if the PR to too much behind origin
And removes the docs generation/deploy part
This commit is contained in:
2
.github/workflows/pre_commit_check.yml
vendored
2
.github/workflows/pre_commit_check.yml
vendored
@ -15,12 +15,14 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.base_ref }}
|
||||
fetch-depth: 20
|
||||
- name: Fetch head and base refs
|
||||
# This is necessary for pre-commit to check the changes in the PR branch (and to set origin/HEAD and HEAD refs)
|
||||
run: |
|
||||
git fetch origin ${{ github.event.pull_request.head.sha }}:pr_ref
|
||||
git checkout pr_ref
|
||||
git remote set-head origin --auto
|
||||
git merge-base origin/HEAD HEAD || ( echo "Your PR is far behind origin/HEAD, please rebase" && exit 1 )
|
||||
- name: Set up Python environment
|
||||
uses: actions/setup-python@master
|
||||
with:
|
||||
|
48
.github/workflows/publish-docs-component.yml
vendored
48
.github/workflows/publish-docs-component.yml
vendored
@ -43,27 +43,27 @@ jobs:
|
||||
tag_name: ${{ env.BUMP_TAG }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Generate docs
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install doxygen clang python3-pip
|
||||
python -m pip install breathe recommonmark esp-docs==1.4.1
|
||||
cd $GITHUB_WORKSPACE/docs
|
||||
./generate_docs
|
||||
- name: Deploying generated docs
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
source $GITHUB_WORKSPACE/docs/utils.sh
|
||||
add_doc_server_ssh_keys $DOCS_DEPLOY_KEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
|
||||
export GIT_VER=$(git describe --always)
|
||||
export GITHUB_REF_NAME=latest
|
||||
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs
|
||||
deploy-docs
|
||||
- name: Upload components to component service
|
||||
uses: espressif/github-actions/upload_components@master
|
||||
with:
|
||||
directories: "components/esp_modem;components/esp_websocket_client;components/mdns;components/asio;components/esp_mqtt_cxx"
|
||||
namespace: "espressif"
|
||||
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
|
||||
# - name: Generate docs
|
||||
# shell: bash
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get -y install doxygen clang python3-pip
|
||||
# python -m pip install breathe recommonmark esp-docs==1.4.1
|
||||
# cd $GITHUB_WORKSPACE/docs
|
||||
# ./generate_docs
|
||||
# - name: Deploying generated docs
|
||||
# if: always()
|
||||
# shell: bash
|
||||
# run: |
|
||||
# source $GITHUB_WORKSPACE/docs/utils.sh
|
||||
# add_doc_server_ssh_keys $DOCS_DEPLOY_KEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
|
||||
# export GIT_VER=$(git describe --always)
|
||||
# export GITHUB_REF_NAME=latest
|
||||
# export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs
|
||||
# deploy-docs
|
||||
# - name: Upload components to component service
|
||||
# uses: espressif/github-actions/upload_components@master
|
||||
# with:
|
||||
# directories: "components/esp_modem;components/esp_websocket_client;components/mdns;components/asio;components/esp_mqtt_cxx"
|
||||
# namespace: "espressif"
|
||||
# api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
|
||||
|
Reference in New Issue
Block a user