From e2b5fcbd7396a17673e1cbe20ad0789b600e20f0 Mon Sep 17 00:00:00 2001 From: rfaircloth-splunk Date: Wed, 1 Sep 2021 15:35:20 -0400 Subject: [PATCH] fix: flip mike order --- .github/workflows/cd-pages.yaml | 30 ++++++-------------------- .github/workflows/ci-main.yaml | 37 ++++++++++++++++----------------- 2 files changed, 24 insertions(+), 43 deletions(-) diff --git a/.github/workflows/cd-pages.yaml b/.github/workflows/cd-pages.yaml index 5c81e3f6c8..133b8ef458 100644 --- a/.github/workflows/cd-pages.yaml +++ b/.github/workflows/cd-pages.yaml @@ -16,34 +16,16 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Get current branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Set up git author - run: | - remote_repo="https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" - git config --global user.name "${GITHUB_ACTOR}" - git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" - git remote rm origin - git remote add origin "${remote_repo}" - git checkout --orphan gh-pages - git pull origin gh-pages - git checkout ${{ steps.extract_branch.outputs.branch }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: oleksiyrudenko/gha-git-credentials@v2-latest + with: + token: "${{ secrets.GITHUB_TOKEN }}" - name: Upload run: | VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | sed 's/v//') echo $VERSION - #We only published tagged version for main - if [[ $VERSION != *"develop"* ]]; then - pip3 install poetry - poetry install - poetry run mike deploy --rebase -p -u $VERSION latest - fi - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + pip3 install poetry + poetry install + poetry run mike deploy --rebase -p -u $VERSION latest helm: runs-on: ubuntu-latest needs: mike diff --git a/.github/workflows/ci-main.yaml b/.github/workflows/ci-main.yaml index 8a1cc85bd3..9b18b8d843 100644 --- a/.github/workflows/ci-main.yaml +++ b/.github/workflows/ci-main.yaml @@ -203,7 +203,23 @@ jobs: --sc4s_host=sc4s \ --junitxml=test-results/test.xml \ -n 14 - + mike: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: oleksiyrudenko/gha-git-credentials@v2-latest + with: + token: "${{ secrets.GITHUB_TOKEN }}" + - name: Upload + run: | + BRANCH=$(echo $GITHUB_REF | cut -d / -f 3) + echo $BRANCH + pip3 install poetry + poetry install + poetry run mike deploy -p $BRANCH release: name: Release runs-on: ubuntu-latest @@ -211,6 +227,7 @@ jobs: - meta - build_action - test-container + - mike steps: - uses: actions/checkout@v2 with: @@ -228,21 +245,3 @@ jobs: @google/semantic-release-replace-plugin env: GITHUB_TOKEN: ${{ secrets.GHCR_PAT }} - mike: - runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/main' }} - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: oleksiyrudenko/gha-git-credentials@v2-latest - with: - token: "${{ secrets.GITHUB_TOKEN }}" - - name: Upload - run: | - BRANCH=$(echo $GITHUB_REF | cut -d / -f 3) - echo $BRANCH - pip3 install poetry - poetry install - poetry run mike deploy -p $BRANCH