From e26caa0637d96b1a89e0edb3e5ff0fabebbc5b0c Mon Sep 17 00:00:00 2001 From: Johannes Baiter Date: Wed, 1 Jun 2022 09:58:59 +0200 Subject: [PATCH] Fix CI config --- .github/workflows/ci.yml | 30 ++++++++++++++---------------- requirements.txt | 4 ++++ 2 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 requirements.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01f692b5..8a444e40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,48 +41,46 @@ jobs: run: ./integration-tests/run.sh publish_mkdocs_latest: - if: github.event_name == 'push' and contains(github.ref, 'refs/tags/') + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') runs-on: ubuntu-latest needs: build - env: - GIT_COMMITTER_NAME: mkdocs-mike - GIT_COMMITTER_EMAIL: mkdocs-mike@nowhere.tld steps: - uses: actions/checkout@v3 - name: Set up Python 3.10 uses: actions/setup-python@v3 with: - python-version: 3.10 + python-version: "3.10" cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip pip install mkdocs singledispatch mkdocs-material mike - name: Deploy documentation with mike - run: mike deploy ${{github.ref_name}} latest - - name: Push gh-pages branch - run: git push origin gh-pages:gh-pages + run: | + git config user.name mkdocs-mike + git config user.email mkdocs-mike@nowhere.tld + git fetch origin gh-pages + mike deploy -p --rebase ${{github.ref_name}} latest publish_mkdocs_wip: - if: github.event_name == 'push' and contains(github.ref, 'main') + if: github.event_name == 'push' && contains(github.ref, 'main') runs-on: ubuntu-latest needs: build - env: - GIT_COMMITTER_NAME: mkdocs-mike - GIT_COMMITTER_EMAIL: mkdocs-mike@nowhere.tld steps: - uses: actions/checkout@v3 - name: Set up Python 3.10 uses: actions/setup-python@v3 with: - python-version: 3.10 + python-version: "3.10" cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip pip install mkdocs singledispatch mkdocs-material mike - name: Deploy documentation with mike - run: mike deploy wip - - name: Push gh-pages branch - run: git push origin gh-pages:gh-pages + run: | + git config user.name mkdocs-mike + git config user.email mkdocs-mike@nowhere.tld + git fetch origin gh-pages + mike deploy -p --rebase wip diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..d6e8dd61 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +mkdocs +singledispatch +mkdocs-material +mike