Skip to content

fix: the github action workflow #20

fix: the github action workflow

fix: the github action workflow #20

name: Flask App CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build static site
run: |
python freeze.py
- name: Commit changes
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Auto-update the docs"
else
echo "No changes to commit"
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main