Skip to content

Commit 2ea599d

Browse files
committed
update webserver
1 parent 701964e commit 2ea599d

11 files changed

Lines changed: 1779 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ permissions:
1111

1212
env:
1313
QT_VERSION: '6.6.0'
14+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1415

1516
jobs:
1617
build:
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Update Games and Index
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 1 * *' # At 00:00 on day-of-month 1.
7+
8+
permissions:
9+
contents: write
10+
actions: write
11+
12+
jobs:
13+
update-games:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Free additional disk space
18+
run: |
19+
sudo apt purge -yq $(
20+
dpkg -l |
21+
grep '^ii' |
22+
awk '{ print $2 }' |
23+
grep -P '(mecab|linux-azure-tools-|aspnetcore|liblldb-|netstandard-|clang-tidy|clang-format|gfortran-|mysql-|google-cloud-cli|postgresql-|cabal-|dotnet-|ghc-|mongodb-|libmono|llvm-16|llvm-17)'
24+
) || true
25+
sudo apt purge -yq \
26+
snapd kubectl podman ruby3.2-doc mercurial-common git-lfs \
27+
skopeo buildah vim python3-botocore azure-cli powershell \
28+
shellcheck firefox google-chrome-stable microsoft-edge-stable || true
29+
sudo apt autoremove -yq
30+
sudo apt clean
31+
32+
- name: Install Git
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y git
36+
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 0
41+
42+
- name: Configure Git Performance
43+
run: |
44+
git config --global pack.threads 0
45+
46+
- name: Set up Python
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: '3.11'
50+
51+
- name: Run Manifest Grabber (Timeout Safe)
52+
id: manifest
53+
continue-on-error: true
54+
run: |
55+
# Run for up to 350 minutes (5h 50m) to leave time for commit/push
56+
timeout 350m python mainfest.py --cleanup -v || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
57+
58+
- name: Commit and push changes
59+
if: always() # Run even if the python script timed out
60+
uses: stefanzweifel/git-auto-commit-action@v5
61+
with:
62+
commit_message: "chore: update game manifests [skip ci]"
63+
file_pattern: games/*.lua
64+
branch: main
65+
66+
- name: Trigger Index Generation
67+
if: always() # Run even if previous steps failed/timed out, as long as we have something
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
run: |
71+
gh workflow run generate-index.yml

webserver/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Environment variables (secrets)
2+
.env
3+
4+
# Python
5+
__pycache__/
6+
*.py[cod]
7+
*.egg-info/
8+
dist/
9+
build/
10+
venv/
11+
.venv/
12+
13+
# Node
14+
node_modules/
15+
16+
# Netlify
17+
.netlify/
18+
19+
# IDE
20+
.vscode/
21+
.idea/

webserver/.vercelignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore Node.js files on Vercel so it strictly builds the Python Flask app
2+
package.json
3+
package-lock.json
4+
node_modules/
5+
netlify/
6+
netlify.toml

webserver/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
app = Flask(__name__)
1515

1616
# Security configuration
17-
# These should be set as environment variables in Vercel/Production or in a .env file locally
17+
# These should be set as environment variables in Vercel/Netlify/Production or in a .env file locally
1818
ACCESS_TOKEN = os.environ.get('SERVER_ACCESS_TOKEN')
1919
ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD')
2020

0 commit comments

Comments
 (0)