Replace GitLab CI with Gitea Actions workflows
GitLab CE was migrated off to reduce memory pressure on the host, so .gitlab-ci.yml is dead. Split into one workflow file per site (shared, 40k-rankings, aos-rankings, kingmaker, scouting, events) since Gitea/ GitHub Actions path filters are workflow-level, not job-level like GitLab's rules.changes. Build+deploy are combined into a single job per site rather than separate build/deploy stages, since both run on the same host and there's no need to round-trip artifacts between them. The weekly ELO refresh job's schedule (Wed 02:00 Atlantic/Azores) is approximated as a fixed 02:00 UTC cron, since Actions cron has no DST handling. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
name: Deploy 40k-rankings
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'sites/40k-rankings/**'
|
||||
- 'shared/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: host
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
working-directory: sites/40k-rankings
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
- name: Deploy
|
||||
run: |
|
||||
rsync -avz --delete --exclude images --exclude footer.html sites/40k-rankings/dist/ /var/www/domains/gateway-gamers.net/40k-rankings/
|
||||
@@ -0,0 +1,23 @@
|
||||
name: Deploy aos-rankings
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'sites/aos-rankings/**'
|
||||
- 'shared/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: host
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
working-directory: sites/aos-rankings
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
- name: Deploy
|
||||
run: |
|
||||
rsync -avz --delete --exclude images --exclude footer.html sites/aos-rankings/dist/ /var/www/domains/gateway-gamers.net/aos-rankings/
|
||||
@@ -0,0 +1,23 @@
|
||||
name: Deploy events
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'sites/events/**'
|
||||
- 'shared/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: host
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
working-directory: sites/events
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
- name: Deploy
|
||||
run: |
|
||||
rsync -avz --delete --exclude images --exclude footer.html sites/events/dist/ /var/www/domains/gateway-gamers.net/events/
|
||||
@@ -0,0 +1,23 @@
|
||||
name: Deploy kingmaker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'sites/kingmaker/**'
|
||||
- 'shared/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: host
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
working-directory: sites/kingmaker
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
- name: Deploy
|
||||
run: |
|
||||
rsync -avz --delete --exclude images --exclude footer.html sites/kingmaker/dist/ /var/www/domains/gateway-gamers.net/kingmaker/
|
||||
@@ -0,0 +1,23 @@
|
||||
name: Deploy scouting
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'sites/scouting/**'
|
||||
- 'shared/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: host
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
working-directory: sites/scouting
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
- name: Deploy
|
||||
run: |
|
||||
rsync -avz --delete --exclude images --exclude footer.html sites/scouting/dist/ /var/www/domains/gateway-gamers.net/scouting/
|
||||
@@ -0,0 +1,18 @@
|
||||
name: Deploy shared assets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'shared/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: host
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Deploy shared assets
|
||||
run: |
|
||||
rsync -avz --delete shared/images/ /var/www/domains/gateway-gamers.net/shared/images/
|
||||
rsync -avz shared/footer.html /var/www/domains/gateway-gamers.net/shared/footer.html
|
||||
@@ -0,0 +1,30 @@
|
||||
name: Weekly ELO Sync
|
||||
|
||||
# Original GitLab pipeline schedule ran Wednesdays 02:00 Atlantic/Azores.
|
||||
# Actions cron is always UTC with no DST handling, so this is a fixed
|
||||
# approximation (02:00 UTC) rather than an exact equivalent year-round.
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 2 * * 3'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
refresh:
|
||||
runs-on: host
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Refresh ELO data
|
||||
working-directory: sites/40k-rankings/statcheck-elo-scraper
|
||||
run: python3 refresh_elo.py
|
||||
- name: Commit and push if changed
|
||||
env:
|
||||
GITEA_ACCESS_TOKEN: ${{ secrets.GITEA_ACCESS_TOKEN }}
|
||||
run: |
|
||||
git config user.email "gitea-actions@gateway-gamers.net"
|
||||
git config user.name "Gitea Actions"
|
||||
git remote set-url origin "https://mandalore:${GITEA_ACCESS_TOKEN}@gl.mando.club/mandalore/gateway-gamers.net.git"
|
||||
git add sites/40k-rankings/public/elo-data.json
|
||||
if ! git diff --cached --quiet; then
|
||||
git commit -m "data: refresh stat-check ELO rankings"
|
||||
git push origin HEAD:main
|
||||
fi
|
||||
Reference in New Issue
Block a user