Skip to content

Commit

Permalink
Merge pull request #11108 from richard-cox/codecov-2.8
Browse files Browse the repository at this point in the history
[2.8] Backport changes for gh action updates
  • Loading branch information
richard-cox authored May 24, 2024
2 parents 0a03a0c + 763f5cb commit 05e563f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 69 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build-extension-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ jobs:
with:
version: v3.8.0

- name: Setup yq
uses: chrisdickinson/[email protected]
with:
yq-version: v4.34.2

- name: Setup Nodejs and npm
uses: actions/setup-node@v3
with:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/build-extension-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ jobs:
with:
version: v3.8.0

- name: Setup yq
uses: chrisdickinson/[email protected]
with:
yq-version: v4.34.2

- name: Setup Nodejs and npm
uses: actions/setup-node@v3
with:
Expand Down
42 changes: 26 additions & 16 deletions .github/workflows/docusaurus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
branches:
- master
jobs:
deploy:
name: Publish Docusaurus
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -23,19 +23,29 @@ jobs:
- name: Build website
run: cd docusaurus/ && yarn build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Publish Docusaurus
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
if: ${{ github.event_name == 'push' && github.repository_owner == 'rancher' }}
uses: actions/upload-pages-artifact@v3
with:
deploy_key: ${{ secrets.GH_PAGES_DEPLOY_KEY }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docusaurus/build
# Remove .gitignore from excludes
exclude_assets: ''
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
path: ./docusaurus/build
retention-days: 10
compression-level: 9

# Seperate the deploy job to isolate write permissions
deploy:
name: Publish
if: ${{ github.event_name == 'push' && github.repository_owner == 'rancher' }}
runs-on: ubuntu-latest
needs: build

# This is required to avoid https://github.com/actions/deploy-pages/issues/271
environment:
name: github-pages

permissions:
pages: write
id-token: write

steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
17 changes: 0 additions & 17 deletions .github/workflows/notify-docs-team.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,32 +175,6 @@ jobs:
- name: Run tests
uses: ./.github/actions/lint

coverage:
runs-on: ubuntu-latest
needs:
- unit-test
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- uses: actions/setup-node@v3
with:
node-version: '14.x'

- name: Download Coverage Artifacts
uses: actions/download-artifact@v3
with:
name: ${{github.run_number}}-${{github.run_attempt}}-coverage

- name: Upload unit test coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
files: ./coverage/coverage-unit.json
fail_ci_if_error: false

check-e2e-tags:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 05e563f

Please sign in to comment.