This commit is contained in:
@@ -13,6 +13,10 @@ on:
|
|||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: org-web-build
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: org-web
|
runs-on: org-web
|
||||||
@@ -21,28 +25,29 @@ jobs:
|
|||||||
SITE_OUTPUT_DIR: /home/zaine/master-folder/org_files/org_web/output
|
SITE_OUTPUT_DIR: /home/zaine/master-folder/org_files/org_web/output
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Commit hidden details files on scheduled/manual run
|
||||||
uses: actions/checkout@v4
|
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
|
||||||
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: |
|
run: |
|
||||||
git checkout main
|
cd /home/zaine/master-folder/org_files/org_web
|
||||||
git pull --ff-only origin main
|
|
||||||
|
git switch main
|
||||||
|
|
||||||
git config user.name "gitea-actions"
|
git config user.name "gitea-actions"
|
||||||
git config user.email "gitea-actions@localhost"
|
git config user.email "gitea-actions@localhost"
|
||||||
|
|
||||||
git add assets/content/hidden-details.json assets/scripts/hidden-details.js
|
git add assets/content/hidden-details.json assets/scripts/hidden-details.js
|
||||||
|
|
||||||
git commit -m "Update hidden details [skip actions]"
|
if git diff --cached --quiet; then
|
||||||
git push origin HEAD:main
|
echo "No hidden details changes to commit."
|
||||||
|
else
|
||||||
|
git commit -m "Update hidden details [skip actions]"
|
||||||
|
git pull --rebase origin main
|
||||||
|
git push origin main
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build site
|
- name: Build site
|
||||||
run: |
|
run: |
|
||||||
|
cd /home/zaine/master-folder/org_files/org_web
|
||||||
mkdir -p /home/zaine/logs
|
mkdir -p /home/zaine/logs
|
||||||
SITE_CLEAN=1 make 2>&1 | tee /home/zaine/logs/org-web.log
|
SITE_CLEAN=1 make 2>&1 | tee /home/zaine/logs/org-web.log
|
||||||
|
|
||||||
@@ -51,4 +56,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
API_KEY: ${{ secrets.API_KEY }}
|
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