Bump urllib3 from 2.0.4 to 2.0.7 (#10) #8
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: Update Recipes | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup Python Environment | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install Requirements | |
run: pip install . | |
- name: Execute Python script | |
run: | | |
python export.py | |
env: | |
# You must create these repository secrets with your Paprika credentials | |
EMAIL: ${{ secrets.EMAIL }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
- name: setup git config | |
id: get_data | |
if: false #disables commit as data does not need to be saved during testing | |
run: | | |
git config --local user.name ${{ secrets.USERNAME_GITHUB }} | |
git config --local user.email ${{ secrets.EMAIL }} | |
git pull origin master | |
git add _data/* | |
git add assets/images/recipes/* | |
git commit -am "Update recipes" || echo "::set-output name=status::Nothing to update" | |
- name: print variables | |
run: | | |
echo "Status: ${{steps.get_data.outputs.status}}" | |
- name: Push changes | |
#remove false && to enable push *only* when there is new data | |
if: false || steps.get_data.outputs.status != 'Nothing to update' #disables this step | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |