Files
org_web/.gitea/workflows/build.yml
Zaine d20236832b
All checks were successful
Build Org Website / build (push) Successful in 54s
temp change
2026-05-14 11:55:49 +01:00

58 lines
1.5 KiB
YAML
Executable File

name: Build Org Website
on:
push:
branches:
- main
paths-ignore:
- assets/content/hidden-details.json
- assets/scripts/hidden-details.js
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
runs-on: org-web
env:
SITE_OUTPUT_DIR: /home/zaine/master-folder/org_files/org_web/output
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Commit hidden details files on scheduled run
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}}
run: |
git checkout main
git pull --ff-only origin main
git config user.name "gitea-actions"
git config user.email "gitea-actions@localhost"
git add assets/content/hidden-details.json assets/scripts/hidden-details.js
if git diff --cached --quiet; then
echo "No hidden details changes to commit."
else
git commit -m "Update hidden details [skip actions]"
git push origin HEAD:main
fi
- name: Build site
run: |
mkdir -p /home/zaine/logs
SITE_CLEAN=1 make 2>&1 | tee /home/zaine/logs/org-web.log
- name: Monitor build and notify Discord
if: always()
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
API_KEY: ${{ secrets.API_KEY }}
run: /snap/bin/pwsh -NoProfile -File ./gitea-build-monitor.ps1