Publish feeds to GitHub Pages #267
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: Publish feeds to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
# You can also schedule this workflow to run at specific times | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# run every 5 hours between 6am and 10pm | |
- cron: '30 6-22/5 * * *' | |
# allow manual triggering of workflow | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-pages: | |
runs-on: ubuntu-20.04 | |
env: | |
GITHUB_ACTIONS_ENVIRONMENT: true | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/configure-pages@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
cache: 'pip' | |
- run: pip install -r requirements.txt | |
# TODO: add caching playwright installation | |
- run: playwright install-deps && playwright install firefox | |
- run: python app.py | |
- name: Upload pages | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./public | |
deploy: | |
needs: build-pages | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |