Update 24-09-16_Vision-Language-and-VisionLanguage-Modeling-in-Radiol… #901
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
push: | |
branches: main | |
name: Quarto Publish | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip install pandas numpy matplotlib seaborn scikit-learn scipy statsmodels jupyter nbformat missingno | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Render and Publish | |
uses: quarto-dev/quarto-actions/publish@v2 | |
with: | |
target: gh-pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Run the save_insights.py script | |
- name: Save GitHub Insights | |
env: | |
REPO_NAME: ${{ github.repository }} | |
TOKEN: ${{ secrets.GH_PAT }} | |
run: python insights/save_insights.py | |
# Check for changes in the insights directory | |
- name: Check for Changes | |
id: changes | |
run: | | |
git add insights/ | |
if git diff --cached --quiet; then | |
echo "No changes to commit" | |
echo "::set-output name=changed::false" | |
else | |
echo "Changes detected" | |
echo "::set-output name=changed::true" | |
fi | |
# Commit and Push Insights if changes were detected | |
- name: Commit and Push Insights | |
if: steps.changes.outputs.changed == 'true' | |
run: | | |
git config --local user.email "endemann@wisc.edu" | |
git config --local user.name "qualiaMachine" | |
git commit -m "Save GitHub insights on publish" | |
git push | |