forked from ProjectX-VJTI/Xplore-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 922 Bytes
/
Copy pathupdate_data.yaml
File metadata and controls
36 lines (30 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Generate Stats and Deploy
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight
workflow_dispatch: # Allows you to run it manually from the Actions tab
push:
branches:
- main # Runs whenever you update the code on main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write # Needed to push to gh-pages branch
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run Python Data Fetcher
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python fetch_stats.py
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./