Skip to content

Commit cfa02ca

Browse files
yegor256claude
andcommitted
Clean stale files from gh-pages objectionary/ dir on deploy (#5030)
Stage runtime sources into a separate folder and deploy it to the `objectionary/` target with `clean: true`, so files removed from `eo-runtime/src/main/eo/` (e.g. `runtime.eo`) no longer linger on gh-pages. Root-level artifacts keep the additive deploy to preserve historical `xsd/XMIR-*.xsd` files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3ff9b01 commit cfa02ca

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/objectionary.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ set -euo pipefail
66

77
tag=$1
88
mkdir -p gh-pages/xsd
9-
mkdir -p gh-pages/objectionary
9+
mkdir -p gh-pages-objectionary
1010
cp eo-parser/target/classes/XMIR.xsd gh-pages/
1111
cp gh-pages/XMIR.xsd "gh-pages/xsd/XMIR-${tag}.xsd"
12-
cp -R eo-runtime/src/main/eo/* gh-pages/objectionary/
13-
find gh-pages/objectionary -name '*.eo' \
12+
cp -R eo-runtime/src/main/eo/. gh-pages-objectionary/
13+
find gh-pages-objectionary -name '*.eo' \
1414
-exec sed -i "s/jvm org.eolang:eo-runtime:0\.0\.0/jvm org.eolang:eo-runtime:${tag}/g" {} +
15-
find gh-pages/objectionary -name '*.eo' \
15+
find gh-pages-objectionary -name '*.eo' \
1616
-exec sed -i "s/version 0\.0\.0/version ${tag}/g" {} +
17-
find gh-pages/objectionary -name '*.eo' -printf 'objectionary/%P\n' > gh-pages/objectionary.lst
17+
find gh-pages-objectionary -name '*.eo' -printf 'objectionary/%P\n' > gh-pages/objectionary.lst

.github/workflows/objectionary.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ jobs:
2222
java-version: 21
2323
- run: mvn install -DskipTests -Dinvoker.skip --errors --batch-mode
2424
- run: .github/objectionary.sh ${{ github.ref_name }}
25+
- uses: JamesIves/github-pages-deploy-action@v4.8.0
26+
with:
27+
branch: gh-pages
28+
folder: gh-pages-objectionary
29+
target-folder: objectionary
30+
clean: true
2531
- uses: JamesIves/github-pages-deploy-action@v4.8.0
2632
with:
2733
branch: gh-pages

0 commit comments

Comments
 (0)