forked from liuly0322/github-follow-contributions
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.18 KB
/
deploy.yaml
File metadata and controls
56 lines (47 loc) · 1.18 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build and Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Setup NodeJS
uses: actions/setup-node@v5
with:
node-version: 23
cache: 'npm'
- name: Install dependencies
run: |
uv sync
npm ci
- name: Generate files
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
MODEL_NAME: ${{ secrets.MODEL_NAME }}
run: |
mkdir public
uv run python main.py
npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_branch: gh-pages
keep_files: false
force_orphan: true