Merge pull request #9 from grosed/development #11
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: Render README | |
on: | |
push: | |
paths: | |
- 'generate_README_file.qmd' | |
branches: [ "main" ] | |
pull_request: | |
paths: | |
- 'generate_README_file.qmd' | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 pytest | |
python -m pip install jupyter | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Install changepoint package | |
run: | | |
python -m pip install "./python/package/" | |
- run: | | |
quarto --version | |
- name: Render Quarto Project | |
run: | | |
quarto render "./generate_README_file.qmd" | |
- name: copy output to package readme | |
run: | | |
cp ./README.md ./python/package/README.md | |
- name: Commit and push if changed | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git diff --quiet && git diff --staged --quiet || git commit -m 'Update README' | |
git push |