Add scheduled Pages build for CVE radar

This commit is contained in:
0xMarcio
2025-12-17 13:59:51 +01:00
parent aac323de9b
commit 02a23e8ef5

68
.github/workflows/site.yml vendored Normal file
View File

@@ -0,0 +1,68 @@
name: Build & Deploy CVE Radar
on:
schedule:
- cron: '20 6 * * *'
workflow_dispatch:
push:
branches:
- main
paths:
- 'scripts/**'
- 'templates/**'
- 'docs/assets/**'
- 'requirements.txt'
- '.github/workflows/site.yml'
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.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Fetch KEV & EPSS
run: |
python scripts/fetch_kev.py
python scripts/fetch_epss.py
- name: Build site
run: python scripts/build_site.py
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4