From 65d3dd7af52d715a3fa4a411de3ac7770124af5f Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Sun, 10 Oct 2021 18:16:21 -0400 Subject: [PATCH] ci: simplify python dependency step for release/doc pipeline (#596) Slightly simplifies the whole Python dependency step for pipelines generating mkdocs. --- .github/workflows/docs.yml | 15 ++++++--------- .github/workflows/post-release.yml | 17 ++++------------- docs/requirements.txt | 3 +++ 3 files changed, 13 insertions(+), 22 deletions(-) create mode 100644 docs/requirements.txt diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index eeaaf405..6f8175fd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,13 +5,13 @@ on: branches: - master paths: - - 'docs/**' - - '.github/workflows/docs.yml' + - "docs/**" + - ".github/workflows/docs.yml" env: # Assign commit authorship to official Github Actions bot when pushing to the `gh-pages` branch: - GIT_USER: 'github-actions[bot]' - GIT_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com' + GIT_USER: "github-actions[bot]" + GIT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" jobs: build-documentation: @@ -26,11 +26,8 @@ jobs: with: python-version: 3.x - - run: pip install mkdocs-material==7.2.6 - - - run: pip install mdx_truly_sane_lists==1.2 - - - run: pip install mike==1.1.0 + - name: Install Python dependencies + run: pip install docs/requirements.txt - name: Configure git user and email run: | diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 1cd7e728..c835a2eb 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -27,15 +27,9 @@ jobs: run: | echo $RELEASE_VERSION - - name: Make sure you're not on master... + - name: Make sure you're not on master/main/nightly... run: | - if [[ $RELEASE_VERSION == "master" ]]; then - exit 1 - fi - - - name: Make sure you're not on nightly... - run: | - if [[ $RELEASE_VERSION == "nightly" ]]; then + if [[ $RELEASE_VERSION == "master" || $RELEASE_VERSION == "main" || $RELEASE_VERSION == "nightly" ]]; then exit 1 fi @@ -43,11 +37,8 @@ jobs: with: python-version: 3.x - - run: pip install mkdocs-material==7.2.6 - - - run: pip install mdx_truly_sane_lists==1.2 - - - run: pip install mike==1.1.0 + - name: Install Python dependencies + run: pip install docs/requirements.txt - name: Configure git user and email run: | diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..b29234b0 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,3 @@ +mkdocs-material == 7.3.2 +mdx_truly_sane_lists == 1.2 +mike == 1.1.2 \ No newline at end of file