Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Website: when the guide's sources match the latest tag, publish main's built guide (a tag on the tested code commit, with the pages rebuilt after it)

islandmed2b6a27555f27
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
index 0bdf0397..abcc0c78 100644
--- a/.github/workflows/pages.yml
+++ b/.github/workflows/pages.yml
@@ -31,9 +31,15 @@ jobs:
- name: Guide from the latest release
run: |
tag=$(git tag -l 'v[0-9]*' --sort=-v:refname | grep -v -- - | head -1)
- echo "Guide from $tag"
- rm -rf website/guide
- git archive "$tag" website/guide website/sitemap.xml | tar -x
+ # A tag can sit on the tested code commit while the guide's pages were rebuilt just after it: when the
+ # guide's sources haven't changed since the tag, main's built guide is that release's guide.
+ if git diff --quiet "$tag" HEAD -- docs/guide tools/guide; then
+ echo "Guide from main (its sources match $tag)"
+ else
+ echo "Guide from $tag"
+ rm -rf website/guide
+ git archive "$tag" website/guide website/sitemap.xml | tar -x
+ fi
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
@@ -66,9 +72,15 @@ jobs:
- name: Guide from the latest release
run: |
tag=$(git tag -l 'v[0-9]*' --sort=-v:refname | grep -v -- - | head -1)
- echo "Guide from $tag"
- rm -rf website/guide
- git archive "$tag" website/guide website/sitemap.xml | tar -x
+ # A tag can sit on the tested code commit while the guide's pages were rebuilt just after it: when the
+ # guide's sources haven't changed since the tag, main's built guide is that release's guide.
+ if git diff --quiet "$tag" HEAD -- docs/guide tools/guide; then
+ echo "Guide from main (its sources match $tag)"
+ else
+ echo "Guide from $tag"
+ rm -rf website/guide
+ git archive "$tag" website/guide website/sitemap.xml | tar -x
+ fi
- name: Push website/ to islandmed/islandmed.github.io
env:
KEY: ${{ secrets.MIRROR_DEPLOY_KEY }}