From cb3efb6eddf0d1e41a2f5888ba7f34dc18969072 Mon Sep 17 00:00:00 2001 From: Zed Spencer-Milnes Date: Sat, 1 Jun 2024 13:11:18 +0100 Subject: [PATCH] CI/CD - rework to simplify and fix build --- .github/actions/entrypoint.sh | 2 +- .github/workflows/check-build.yml | 36 +++++++++++++++++++++++++++ .github/workflows/main.yml | 41 ------------------------------- .github/workflows/publish.yaml | 1 + mkdocs.yml | 2 +- requirements.txt | 4 ++- 6 files changed, 42 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/check-build.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/actions/entrypoint.sh b/.github/actions/entrypoint.sh index 75ede785..a78e4f09 100644 --- a/.github/actions/entrypoint.sh +++ b/.github/actions/entrypoint.sh @@ -3,7 +3,7 @@ cd "${GITHUB_WORKSPACE}" # Python Dependencies -pip --no-cache-dir install git+https://github.com/linkchecker/linkchecker@v10.1.0#egg=linkchecker +pip --no-cache-dir install git+https://github.com/linkchecker/linkchecker@v10.3.0#egg=linkchecker # NodeJS Dependencies npm ci diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml new file mode 100644 index 00000000..585f9833 --- /dev/null +++ b/.github/workflows/check-build.yml @@ -0,0 +1,36 @@ +name: Build Check + +on: + pull_request: + branches: [ main ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + TITLE: OKD.io + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - name: Install dependencies (Python) + run: pip install -r requirements.txt --break-system-packages + - name: Install dependencies (Node) + run: npm ci + - name: Spellcheck + run: ./node_modules/.bin/cspell "docs/**/*.md" + - name: Python Dependencies Required + run: mkdocs get-deps --verbose + - name: Build the site + run: mkdocs build --strict --clean --verbose + - name: Check the site for broken links + run: linkchecker -f linkcheckerrc public + - name: Upload built site + uses: actions/upload-artifact@v4 + with: + name: okd.io + path: public/ + if-no-files-found: error diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 0ab673c7..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -name: CI - -on: - pull_request: - branches: [ main ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - container: - image: quay.io/fedora/fedora:latest - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Install NPM - run: | - dnf install -y nodejs npm - - - name: Install PIP - run: | - dnf install -y python3-pip - - - name: Install Git - run: | - dnf install -y git - - - name: Install required dependencies - run: | - pip3 install -r requirements.txt - npm ci - - - name: Run the build - run: | - export PATH=$PATH:node_modules/.bin/ - ./build.sh diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 60660451..5f661c28 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,6 +3,7 @@ name: Publish on: push: branches: [ main ] + workflow_dispatch: jobs: publish: diff --git a/mkdocs.yml b/mkdocs.yml index dd82f1fe..143e4cba 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,7 @@ site_name: OKD.io site_description: >- The Community Distribution of Kubernetes that powers Red Hat OpenShift -site_url: https://openshift-cs.github.io/okd.io/index.html +site_url: https://okd.io/ site_author: Brian Innes repo_name: "okd-io" repo_url: https://github.com/okd-project/okd.io diff --git a/requirements.txt b/requirements.txt index f8ad8001..736e5ad5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,6 @@ mkdocs==1.6.0 mkdocs-material==9.5.25 mkdocs-minify-plugin==0.8.0 -git+https://github.com/linkchecker/linkchecker@v10.3.0#egg=linkchecker +linkchecker==10.4.0 +pymdown-extensions==10.8.1 +mkdocs-material[imaging]==9.5.25