generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (34 loc) · 1.16 KB
/
render-readme.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: 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 }}