-
Notifications
You must be signed in to change notification settings - Fork 6
74 lines (56 loc) · 1.57 KB
/
Copy pathdeploy-pages.yml
File metadata and controls
74 lines (56 loc) · 1.57 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Deploy API (GitHub Pages)
on:
push:
branches: [main]
schedule:
- cron: "0 * * * *"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch GitHub stats
run: python3 scripts/fetch-stats.py
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Build static site and API
run: |
rm -rf public
python scripts/API/emit_static_api.py
mkdir -p public
cp -a public_html/. public/
echo "[ls] public/"
ls -la public/
echo "[ls] public/api/"
ls -la public/api/
echo "[ls] public/api/v1/"
ls -la public/api/v1/
test -f public/api/v1/index.json
test -f public/api/v1/search-index.json
test -f public/api/v1/manifest.json
- name: Debug Queue Manager in built API
run: |
jq '.plugins[] | select(.repo=="GabiRP/QueueManager")' public/api/v1/index.json || true
jq '.[] | select(.repo=="GabiRP/QueueManager")' public/api/v1/plugins.json || true
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4