mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-31 19:24:43 +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
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.base_ref }}
|
ref: ${{ github.base_ref }}
|
||||||
|
fetch-depth: 20
|
||||||
- name: Fetch head and base refs
|
- 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)
|
# This is necessary for pre-commit to check the changes in the PR branch (and to set origin/HEAD and HEAD refs)
|
||||||
run: |
|
run: |
|
||||||
git fetch origin ${{ github.event.pull_request.head.sha }}:pr_ref
|
git fetch origin ${{ github.event.pull_request.head.sha }}:pr_ref
|
||||||
git checkout pr_ref
|
git checkout pr_ref
|
||||||
git remote set-head origin --auto
|
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
|
- name: Set up Python environment
|
||||||
uses: actions/setup-python@master
|
uses: actions/setup-python@master
|
||||||
with:
|
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 }}
|
tag_name: ${{ env.BUMP_TAG }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Generate docs
|
# - name: Generate docs
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
sudo apt-get update
|
# sudo apt-get update
|
||||||
sudo apt-get -y install doxygen clang python3-pip
|
# sudo apt-get -y install doxygen clang python3-pip
|
||||||
python -m pip install breathe recommonmark esp-docs==1.4.1
|
# python -m pip install breathe recommonmark esp-docs==1.4.1
|
||||||
cd $GITHUB_WORKSPACE/docs
|
# cd $GITHUB_WORKSPACE/docs
|
||||||
./generate_docs
|
# ./generate_docs
|
||||||
- name: Deploying generated docs
|
# - name: Deploying generated docs
|
||||||
if: always()
|
# if: always()
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
source $GITHUB_WORKSPACE/docs/utils.sh
|
# source $GITHUB_WORKSPACE/docs/utils.sh
|
||||||
add_doc_server_ssh_keys $DOCS_DEPLOY_KEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
|
# add_doc_server_ssh_keys $DOCS_DEPLOY_KEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
|
||||||
export GIT_VER=$(git describe --always)
|
# export GIT_VER=$(git describe --always)
|
||||||
export GITHUB_REF_NAME=latest
|
# export GITHUB_REF_NAME=latest
|
||||||
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs
|
# export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs
|
||||||
deploy-docs
|
# deploy-docs
|
||||||
- name: Upload components to component service
|
# - name: Upload components to component service
|
||||||
uses: espressif/github-actions/upload_components@master
|
# uses: espressif/github-actions/upload_components@master
|
||||||
with:
|
# with:
|
||||||
directories: "components/esp_modem;components/esp_websocket_client;components/mdns;components/asio;components/esp_mqtt_cxx"
|
# directories: "components/esp_modem;components/esp_websocket_client;components/mdns;components/asio;components/esp_mqtt_cxx"
|
||||||
namespace: "espressif"
|
# namespace: "espressif"
|
||||||
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
|
# api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
|
||||||
|
Reference in New Issue
Block a user