mirror of
https://github.com/0xMarcio/cve.git
synced 2026-10-27 16:51:03 +00:00
Pages builds from the workflow artifact, so the committed CVE_list.json was never served while adding a fresh 53 MB blob to history every day. Generate it during the Pages build instead and drop the duplicate generator; scripts/build_site.py is now the only thing that writes it. The jinja2 templates re-rendered a trending table that logic.js replaces on load, so the page shell goes back to being a plain static file and the Pages build no longer installs anything. Shallow-clone the sync job too: it never reads git history, and the three-day lookback already recovers a skipped day.
60 lines
1.2 KiB
YAML
60 lines
1.2 KiB
YAML
name: Build & Deploy CVE Radar
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '20 6 * * *'
|
|
workflow_dispatch:
|
|
workflow_run:
|
|
workflows:
|
|
- Sync CVE PoCs
|
|
- Hot CVEs List
|
|
types:
|
|
- completed
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: 'pages'
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v7
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Build site data
|
|
run: python3 scripts/build_site.py
|
|
|
|
- name: Configure Pages
|
|
uses: actions/configure-pages@v6
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v5
|
|
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@v5
|