Skip to content

Auto-Sync Telemetry & Deploy to GitHub Pages #8

Auto-Sync Telemetry & Deploy to GitHub Pages

Auto-Sync Telemetry & Deploy to GitHub Pages #8

Workflow file for this run

name: Auto-Sync Telemetry & Deploy to GitHub Pages
on:
schedule:
# Corre todos los días a las 06:00 UTC (1 vez al día)
- cron: '0 6 * * *'
workflow_dispatch: # Permite ejecución manual con un click desde GitHub Actions
push:
branches:
- main
- dev
permissions:
contents: write
jobs:
telemetry-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Set up Python Environment
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Extract Telemetry Data
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python3 scripts/update_metrics.py
- name: Install Playwright Browsers & Dependencies
run: |
pip install playwright
playwright install --with-deps chromium
- name: Generate Social Preview Card (og-preview.png)
run: |
python3 scripts/generate_preview.py
- name: Deploy to GitHub Pages Branch (gh-pages)
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./
keep_files: false
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'deploy(telemetry): auto-publish latest metrics & social preview to gh-pages [skip ci]'