Skip to content

Commit

Permalink
Add missing ref to url links in OpenGraph metadata (#958)
Browse files Browse the repository at this point in the history
Attempt to find-replace meta tags with proper urls
  • Loading branch information
elisno committed Jan 17, 2024
1 parent 89866d5 commit 9315431
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ jobs:
if: ${{ github.ref_type == 'tag' }}
run: cp docs/source/_templates/redirect-to-stable.html cleanlab-docs/index.html

- name: Update OpenGraph URLs in HTML files
env:
REF_URL_SEGMENT: ${{ (github.ref_type == 'tag' && steps.stable_release.outcome == 'success') && 'stable' || github.ref_name }}
uses: jacobtomlinson/gha-find-replace@v2
with:
find: '<meta property="og:url" content="${{ env.DOCS_SITE_URL }}'
replace: '<meta property="og:url" content="${{ env.DOCS_SITE_URL }}${{ env.REF_URL_SEGMENT }}/'
include: "cleanlab-docs/**/*.html"
regex: false

- name: Deploy
if: ${{ (github.ref == 'refs/heads/master') || (github.ref_type == 'tag') }}
uses: peaceiris/actions-gh-pages@v3
Expand Down

0 comments on commit 9315431

Please sign in to comment.