@@ -24,25 +24,35 @@ jobs:
2424 - name : Install Python dependencies
2525 run : pip install requests pyyaml
2626
27- - name : Get repo name and run script
27+ - name : Get repo name (lowercase) and run script
2828 run : |
29- REPO_NAME=$(basename "${{ github.repository }}")
29+ REPO_NAME=$(basename "${{ github.repository }}") # e.g., Scatterplot
30+ REPO_NAME_LC="${REPO_NAME,,}" # scatterplot
3031 echo "Running from repo: $REPO_NAME"
32+ echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV # export for later steps
33+ echo "REPO_NAME_LC=$REPO_NAME_LC" >> $GITHUB_ENV
3134 python scripts/update_plugininfo.py "$REPO_NAME"
3235 env :
3336 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3437
3538 - name : Clone manivaultstudio.github.io (feature branch)
3639 run : |
37- git clone --branch ft/test-plugin-push https://x-access-token:${{ secrets.TEST_GH_PAGES_DEPLOY_TOKEN }}@github.com/ManiVaultStudio/manivaultstudio.github.io.git target-repo
38- REPO_NAME=$(basename "${{ github.repository }}")
39- cp "$REPO_NAME.md" target-repo/_plugins/
40+ git clone --branch ft/test-plugin-push \
41+ https://x-access-token:${{ secrets.TEST_GH_PAGES_DEPLOY_TOKEN }}@github.com/ManiVaultStudio/manivaultstudio.github.io.git \
42+ target-repo
43+ cp "${REPO_NAME_LC}.md" target-repo/_plugins/
44+ if [ -f "target-repo/_plugins/${REPO_NAME_LC}.md" ]; then
45+ echo "Target file ${REPO_NAME_LC}.md found in _plugins/"
46+ else
47+ echo "Target file ${REPO_NAME_LC}.md not found in _plugins/"
48+ exit 1
49+ fi # quick sanity
4050
4151 - name : Commit and push
4252 run : |
4353 cd target-repo
4454 git config user.name "ManiVault Bot"
4555 git config user.email "bot@manivault.studio"
46- git add _plugins/
47- git commit -m "🔄 Auto-update plugin card from $REPO_NAME"
56+ git add " _plugins/${REPO_NAME_LC}.md"
57+ git commit -m "🔄 Auto-update plugin card from ${ REPO_NAME} "
4858 git push origin ft/test-plugin-push
0 commit comments