From 5ddb6e7c39d9b9c022fd355928286b8e01e0070d Mon Sep 17 00:00:00 2001 From: Zed Spencer-Milnes Date: Sat, 1 Jun 2024 12:50:17 +0100 Subject: [PATCH] Re-do CI/CD flow to try and debug site builds --- .github/actions/entrypoint.sh | 2 +- .github/workflows/check-build.yml | 34 +++++++++++++++++++++++++ .github/workflows/main.yml | 41 ------------------------------- .github/workflows/publish.yaml | 1 + mkdocs.yml | 2 +- 5 files changed, 37 insertions(+), 43 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..b28637d7 --- /dev/null +++ b/.github/workflows/check-build.yml @@ -0,0 +1,34 @@ +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: Build the site + run: mkdocs build --force --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