Update load_dashboard.yml #22
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
name: Deploy Quarto Dashboard to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Step 2: Install Quarto CLI | |
- name: Install Quarto CLI | |
uses: quarto-dev/quarto-actions/setup@v2 | |
# Step 3: Render the Quarto project into the docs folder | |
- name: Render Quarto project to docs | |
run: quarto render -o docs | |
# Step 4: Add .nojekyll file | |
- name: Add .nojekyll to prevent Jekyll processing | |
run: echo > docs/.nojekyll | |
# Step 5: Commit changes | |
- name: Commit changes | |
run: | | |
git config --local user.name "GitHub Actions" | |
git config --local user.email "[email protected]" | |
git add docs | |
git commit -m "Update docs folder [skip ci]" || echo "No changes to commit" | |
# Step 6: Push changes back to the main branch | |
- name: Push changes to main | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: main |