Skip to content

Commit

Permalink
try using absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
MeWu-IDM committed Sep 26, 2024
1 parent 5a83a22 commit 7ffdd96
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ jobs:
source /opt/venv/bin/activate
echo 'activated virtualenv.'
chmod +x ./r/install_quarto_extensions.expect
./r/install_quarto_extensions.expect
chmod +x /workspace/r/install_quarto_extensions.expect
/workspace/r/install_quarto_extensions.expect
quarto list extensions
FOLDERS=(python r)
echo 'Folders to process: \${FOLDERS[@]}'
for FOLDER in \"\${FOLDERS[@]}\"; do
echo \"Searching for .qmd and .ipynb files in \$FOLDER...\"
find \"\$FOLDER\" \( -name '*.qmd' -o -name '*.ipynb' \) | while read -r file; do
echo \"Searching for .qmd and .ipynb files in /workspace/\$FOLDER...\"
find \"/workspace/\$FOLDER\" \( -name '*.qmd' -o -name '*.ipynb' \) | while read -r file; do
echo \"Processing file: \$file\"
target_dir=\"gallery/\$(dirname \"\$file\")\"
target_dir=\"/workspace/gallery/\$(dirname \"\$file\")\"
echo \"Creating target directory: \$target_dir\"
mkdir -p \"\$target_dir\" && echo \"Directory \$target_dir created.\"
Expand All @@ -65,6 +65,7 @@ jobs:
done
done"
- name: Generate Index HTML
run: |
ls -laR gallery
Expand All @@ -74,7 +75,7 @@ jobs:
echo "<li><a href=\"./$file\">$file_name</a></li>" >> gallery/index.html
done
echo "</ul></body></html>" >> gallery/index.html
- name: Upload HTML output
uses: actions/upload-artifact@v4
with:
Expand All @@ -89,7 +90,6 @@ jobs:
- name: Commit and Push to docs branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: gallery
run: |
ls -laR .
# Fetch all branches
Expand All @@ -108,7 +108,7 @@ jobs:
echo "No changes to commit."
else
# Commit and push changes
git add .
git add gallery
git commit -m "Update rendered Quarto files for GitHub Pages (commit: ${{ github.sha }})"
git push origin docs --force
fi

0 comments on commit 7ffdd96

Please sign in to comment.