Generates main radio podcasts #31673
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Generates main radio podcasts | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- '**/.gitignore' | |
- '**/*.md' | |
- LICENSE | |
- site/* | |
- vscode/* | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: "1 * * * *" #runs every hour at min 0 | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch full Git history (not shallow) | |
run: | | |
git fetch --unshallow | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Create podcasts | |
run: | | |
python radio2podcasts/__main__.py --input=podcasts.json --output=index.html | |
if [[ -z $(git status -s) ]] | |
then | |
echo "Nothing to commit." | |
else | |
echo "---------------------------------" | |
ls | |
echo "---------------------------------" | |
git config user.name "catus felis" | |
git config user.email catusf@users.noreply.github.com | |
git branch --show-current | |
git add site | |
git status | |
git commit -m "Update website" | |
git fetch | |
git push origin --force | |
fi | |
- name: Deploy site to GitHub Pages 🚀 | |
uses: JamesIves/github-pages-deploy-action@3.6.2 | |
with: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
BRANCH: gh-pages # The branch the action should deploy to. | |
FOLDER: site # The folder the action should deploy. | |
CLEAN: true # Automatically remove deleted files from the deploy branch |