mirror of
https://github.com/0xMarcio/cve.git
synced 2026-02-12 18:42:46 +00:00
Add scheduled Pages build for CVE radar
This commit is contained in:
68
.github/workflows/site.yml
vendored
Normal file
68
.github/workflows/site.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user