Skip to content

Update status demo page #147

Update status demo page

Update status demo page #147

Workflow file for this run

name: "Update status demo page"
on:
schedule:
- cron: "* 6 15 * *"
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Dependencies 🔧
run: sudo apt-get install curl iputils-ping traceroute netcat-openbsd grep sed
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Configuration 🖊️
run: |
mkdir -p "build/"
mkdir -p "$HOME/status/"
echo 'MY_STATUS_HTML="build/index.html"' > config
echo 'MY_STATUS_JSON="build/status.json"' >> config
echo 'MY_STATUS_ICON="build/status.svg"' >> config
echo 'MY_MAINTENANCE_TEXT_FILE="status_maintenance_text.txt"' >> config
echo 'MY_HOSTNAME_FILE="status_hostname_list.txt"' >> config
echo 'This is a demo page of <a href="https://github.com/Cyclenerd/static_status">static_status</a>.' > status_maintenance_text.txt
echo 'There is also a <a href="status.json">JSON version</a> and a <a href="status.svg">SVG icon</a> of this status page.' >> status_maintenance_text.txt
echo 'This status page was generated with GitHub Action.' >> status_maintenance_text.txt
echo 'curl;https://www.heise.de/ping|www.heise.de (curl)' > status_hostname_list.txt
echo 'curl;ftp://ftp.usa.openbsd.org/pub/OpenBSD/timestamp|ftp.usa.openbsd.org (curl)' >> status_hostname_list.txt
echo 'nc;8.8.8.8|DNS @ Google (nc);53' >> status_hostname_list.txt
echo 'script;/bin/true|Always up (/bin/true)' >> status_hostname_list.txt
echo 'script;exit 80|Always degraded (exit 80)' >> status_hostname_list.txt
echo 'script;/bin/false|Always down (/bin/false)' >> status_hostname_list.txt
echo "config"
cat config
echo "status_maintenance_text.txt"
cat status_maintenance_text.txt
echo "status_hostname_list.txt"
cat status_hostname_list.txt
- name: Debug 🤯
run: bash status.sh debug
- name: Status 🚦
run: bash status.sh loud
# https://github.com/marketplace/actions/deploy-to-github-pages
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: build # The folder the action should deploy.