From 02a23e8ef57c9f7d4796573b53c37fbf3485c605 Mon Sep 17 00:00:00 2001 From: 0xMarcio Date: Wed, 17 Dec 2025 13:59:51 +0100 Subject: [PATCH] Add scheduled Pages build for CVE radar --- .github/workflows/site.yml | 68 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/site.yml diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml new file mode 100644 index 0000000000..c5e1a6537e --- /dev/null +++ b/.github/workflows/site.yml @@ -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