Files
infstarweb/.github/workflows/deploy.yml

56 lines
1.1 KiB
YAML

name: Deploy to GitHub Pages
on:
push:
branches: [main]
schedule:
# Every 2 days at 04:00 UTC
- cron: "0 4 */2 * *"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Python dependencies
run: pip install requests tqdm
- name: Run statsprocess.py
env:
STATS_USER: ${{ secrets.STATS_USER }}
STATS_PASS: ${{ secrets.STATS_PASS }}
run: python statsprocess.py
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: .
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4