-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Action To Use Quarto For README Generation #49
base: main
Are you sure you want to change the base?
Conversation
…b.com:CDCgov/forecasttools-py into 19-action-to-use-quarto-for-readme-generation
@dylanhmorris I would appreciate some guidance on the correct format of the following workflow: |
At present, the README renders with this as the yaml: The YAMLname: Render Quarto README
on:
push:
paths:
- README.qmd
jobs:
render-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set Up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install Poetry
run: pip install poetry
- name: Install Dependencies With Poetry
run: poetry install --with dev
- name: Set QUARTO_PYTHON to Poetry Environment
run: echo "QUARTO_PYTHON=$(poetry env info --path)/bin/python" >> $GITHUB_ENV
- name: Render README.md From README.qmd
run: quarto render README.qmd
- name: Commit And Push Changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add README.md README.qmd || echo "Nothing to commit"
git commit -m "Auto-update README.md" || echo "No changes to commit"
git push || echo "No changes to commit"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} However, there is a minor formatting issue: <style> .dataframe > thead > tr, .dataframe > tbody > tr { text-align: right; white-space: pre-wrap; } </style> shape: (81_713, 3) |
…b.com:CDCgov/forecasttools-py into 19-action-to-use-quarto-for-readme-generation
…b.com:CDCgov/forecasttools-py into 19-action-to-use-quarto-for-readme-generation
…b.com:CDCgov/forecasttools-py into 19-action-to-use-quarto-for-readme-generation
…b.com:CDCgov/forecasttools-py into 19-action-to-use-quarto-for-readme-generation
…b.com:CDCgov/forecasttools-py into 19-action-to-use-quarto-for-readme-generation
If you're going to have this on every push that modifies |
Re: #49 (comment) I am not sure here and will defer to whatever is decided by you and those who are tagged. Since I do not expect the README.qmd to be updated very often and since I have a vague notion that "server side rendering" is "more robust", I opted for GitHub Actions. That this could be a |
The downside of server-side is that it adds additional commits and means that the local repo doesn't necessarily reflect what's being pushed (without an additional pull). Given that any reasonable dev environment for editing the readme should be able to render it, I don't really see server side rendering as "more robust" in this case. |
The one thing that will be less "just works" with client-side rendering is editing the |
The additional commits & |
I forgot to add a tentative utilities diagram here. I will refine and add the contents of #16 to the README. |
…b.com:CDCgov/forecasttools-py into 19-action-to-use-quarto-for-readme-generation
Order of operations:
|
For the scope of this PR, refer to issue #19 .