This commit is contained in:
@@ -13,6 +13,10 @@ on:
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: org-web-build
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: org-web
|
||||
@@ -21,28 +25,29 @@ jobs:
|
||||
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
|
||||
- name: Commit hidden details files on scheduled/manual run
|
||||
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
|
||||
run: |
|
||||
git checkout main
|
||||
git pull --ff-only origin main
|
||||
cd /home/zaine/master-folder/org_files/org_web
|
||||
|
||||
git switch 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
|
||||
git pull --rebase origin main
|
||||
git push origin main
|
||||
fi
|
||||
|
||||
- name: Build site
|
||||
run: |
|
||||
cd /home/zaine/master-folder/org_files/org_web
|
||||
mkdir -p /home/zaine/logs
|
||||
SITE_CLEAN=1 make 2>&1 | tee /home/zaine/logs/org-web.log
|
||||
|
||||
@@ -51,4 +56,6 @@ jobs:
|
||||
env:
|
||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
API_KEY: ${{ secrets.API_KEY }}
|
||||
run: /snap/bin/pwsh -NoProfile -File ./gitea-build-monitor.ps1
|
||||
run: |
|
||||
cd /home/zaine/master-folder/org_files/org_web
|
||||
/snap/bin/pwsh -NoProfile -File ./gitea-build-monitor.ps1
|
||||
Reference in New Issue
Block a user