diff --git a/.github/workflows/build-docs-preview.yml b/.github/workflows/build-docs-preview.yml index 9aaebc58..e8aa595a 100644 --- a/.github/workflows/build-docs-preview.yml +++ b/.github/workflows/build-docs-preview.yml @@ -24,8 +24,6 @@ jobs: build-docs-preview: runs-on: ubuntu-24.04 if: github.event.action != 'closed' - # env: - # HUGO_VERSION: 0.158.0 steps: # Hugo Module fetching hits proxy.golang.org and sum.golang.org. Harmless under egress-policy: audit, but if the harden-runner is promoted to block, @@ -40,33 +38,6 @@ jobs: with: persist-credentials: false - # hugo-extended is one of the dependencies which gets added onto the node_modules whenever npm install is run, - # so the commented out code below serves as a second installation of hugo within the runner. - # the commented out code is to be removed if the pr preview builds successfully. - - # - name: Install Hugo CLI - # run: | - # wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ - # && sudo dpkg -i ${{ runner.temp }}/hugo.deb - - # - name: Install Dart Sass - # # Direct download from the dart-sass GitHub release rather than - # # `sudo snap install dart-sass` (snap.io's storeserver was flaky - # # in GitHub-hosted runners and broke this workflow on unrelated - # # PRs, see #19574). Hugo Extended ships embedded Dart Sass as of - # # v0.114+ but having the standalone binary on PATH is the most - # # reliable path through `resources.toCSS` with transpiler "dartsass". - # env: - # DART_SASS_VERSION: 1.79.5 - # run: | - # set -eu - # cd "${RUNNER_TEMP}" - # curl -fsSL -o dart-sass.tar.gz "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" - # sudo tar -xzf dart-sass.tar.gz -C /usr/local/lib - # sudo ln -sf /usr/local/lib/dart-sass/sass /usr/local/bin/sass - # sudo ln -sf /usr/local/lib/dart-sass/sass /usr/local/bin/dart-sass - # dart-sass --version - - name: Setup Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: diff --git a/.github/workflows/deploy-docs-preview.yml b/.github/workflows/deploy-docs-preview.yml index 0213183b..55512e95 100644 --- a/.github/workflows/deploy-docs-preview.yml +++ b/.github/workflows/deploy-docs-preview.yml @@ -31,7 +31,7 @@ jobs: egress-policy: audit - name: Download build artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 with: name: docs-preview-build path: docs-preview-build @@ -68,7 +68,7 @@ jobs: persist-credentials: true - name: Download build artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 with: name: docs-preview-build path: docs-preview-build @@ -85,18 +85,33 @@ jobs: umbrella-dir: pr-preview # must match the /pr-preview/ baseURL the build bakes qr-code: false comment: false + wait-for-pages-deployment: false action: ${{ needs.read-metadata.outputs.action == 'closed' && 'remove' || 'deploy' }} pr-number: ${{ needs.read-metadata.outputs.pr-number }} + - name: Build preview comment + if: needs.read-metadata.outputs.action != 'closed' + id: comment-body + env: + PREVIEW_URL: ${{ steps.preview.outputs.preview-url }} + REPO: ${{ github.repository }} + run: | + { + echo "body< *Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment [here](https://github.com/${REPO}/actions/workflows/pages/pages-build-deployment)*" + echo "EOF" + } >> "$GITHUB_OUTPUT" + - name: Comment preview URL - uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2 + uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5 with: header: pr-preview number: ${{ needs.read-metadata.outputs.pr-number }} message: | ${{ needs.read-metadata.outputs.action == 'closed' && 'Preview removed because the pull request was closed.' - || format('📖 Pull request preview: {0}', steps.preview.outputs.preview-url) }} + || steps.comment-body.outputs.body }} prune: needs: read-metadata @@ -107,7 +122,7 @@ jobs: removed_prs_json: ${{ steps.prune-previews.outputs.removed_prs_json }} steps: - name: Checkout gh-pages for preview retention - uses: actions/checkout@v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: gh-pages fetch-depth: 0 @@ -201,7 +216,7 @@ jobs: fi - name: Comment on pruned previews - uses: actions/github-script@v8 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: REMOVED_PRS_JSON: ${{ steps.prune-previews.outputs.removed_prs_json }} PREVIEW_RETENTION_LIMIT: ${{ env.PREVIEW_RETENTION_LIMIT }} @@ -247,4 +262,4 @@ jobs: issue_number: Number(prNumber), body, }); - } \ No newline at end of file + } diff --git a/content/certifications/your-org-uuid/certification-1/test-1.md b/content/certifications/your-org-uuid/certification-1/test-1.md index b68e483f..63aae497 100644 --- a/content/certifications/your-org-uuid/certification-1/test-1.md +++ b/content/certifications/your-org-uuid/certification-1/test-1.md @@ -1,5 +1,5 @@ --- -title: "Exam 1" +title: "Exam 1 (Preview Test)" weight: 1 passPercentage: 70 questions: @@ -17,4 +17,7 @@ questions: isCorrect: true layout: "test" type: "test" ---- \ No newline at end of file +--- + + +