-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (59 loc) · 1.79 KB
/
deploy-pages.yml
File metadata and controls
73 lines (59 loc) · 1.79 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
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: ${{ secrets.GITHUB_TOKEN }}
- name: Build static site and API
run: |
set -euo pipefail
python3 --version
rm -rf public
mkdir -p public
if [ -d public_html ]; then
cp -r public_html/. public/
fi
python3 scripts/API/emit_static_api.py
echo "[ls] public/"
ls -lah public || true
echo "[ls] public/api/"
ls -lah public/api || true
echo "[ls] public/api/v1/"
ls -lah public/api/v1 || true
test -f public/api/v1/index.json || { echo "::error ::public/api/v1/index.json missing"; exit 1; }
test -f public/api/v1/plugins.json || { echo "::error ::public/api/v1/plugins.json missing"; exit 1; }
- 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