From 0fbc1305c72f5b70ad7485edab49399a36bea8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Tue, 22 Oct 2024 10:22:45 +0200 Subject: [PATCH 1/2] RHIDP-4529 Build documentation previews on GitHub with ccutil MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabrice Flore-Thébault --- .github/workflows/build-asciidoc.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-asciidoc.yml b/.github/workflows/build-asciidoc.yml index 8b81b84e5b..6373a420b4 100644 --- a/.github/workflows/build-asciidoc.yml +++ b/.github/workflows/build-asciidoc.yml @@ -17,7 +17,7 @@ name: GitHub Pages on: push: - branches: + branches: - main - rhdh-1.** - 1.**.x @@ -41,14 +41,15 @@ jobs: run: | # update sudo apt-get update -y || true - # install + # install sudo apt-get -y -q install asciidoctor && asciidoctor --version + sudo apt-get -y -q install podman && podman --version echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV - name: Build guides and indexes run: | echo "Building branch ${{ env.GIT_BRANCH }}" - build/scripts/build.sh -b ${{ env.GIT_BRANCH }} + build/scripts/build-ccutil.sh -b ${{ env.GIT_BRANCH }} # repo must be public for this to work - name: Deploy @@ -60,7 +61,7 @@ jobs: keep_files: true publish_dir: ./titles-generated - - name: Cleanup merged PR branches + - name: Cleanup merged PR branches run: | PULL_URL="https://api.github.com/repos/redhat-developer/red-hat-developers-documentation-rhdh/pulls" GITHUB_TOKEN="${{ secrets.RHDH_BOT_TOKEN }}" @@ -70,7 +71,7 @@ jobs: git checkout gh-pages; git pull || true dirs=$(find . -maxdepth 1 -name "pr-*" -type d | sed -r -e "s|^\./pr-||") refs=$(cat pulls.html | grep pr- | sed -r -e "s|.+.html>pr-([0-9]+).+|\1|") - for d in $(echo -e "$dirs\n$refs" | sort -uV); do + for d in $(echo -e "$dirs\n$refs" | sort -uV); do PR="${d}" echo -n "Check merge status of PR $PR ... " PR_JSON=$(curl -sSL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_TOKEN" "$PULL_URL/$PR") From 5ba355d974f9d4b9063648282a552a9ec5151626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Wed, 23 Oct 2024 11:11:12 +0200 Subject: [PATCH 2/2] Update .github/workflows/build-asciidoc.yml Co-authored-by: Nick Boldt --- .github/workflows/build-asciidoc.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-asciidoc.yml b/.github/workflows/build-asciidoc.yml index 6373a420b4..fbdc9f9974 100644 --- a/.github/workflows/build-asciidoc.yml +++ b/.github/workflows/build-asciidoc.yml @@ -42,7 +42,6 @@ jobs: # update sudo apt-get update -y || true # install - sudo apt-get -y -q install asciidoctor && asciidoctor --version sudo apt-get -y -q install podman && podman --version echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV