Skip to content

Set Documentation Page as 'Down for Maintenance' #2

Set Documentation Page as 'Down for Maintenance'

Set Documentation Page as 'Down for Maintenance' #2

name: Set Documentation Page as 'Down for Maintenance'
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Build docs
run: |
mkdir build
cd build
mkdir documentation
cd documentation
echo "<!DOCTYPE html><html><head><title>Down for Maintenance</title><meta http-equiv=\"Cache-Control\" content=\"no-cache, no-store, must-revalidate\"><meta http-equiv=\"Pragma\" content=\"no-cache\"><meta http-equiv=\"Expires\" content=\"0\"></head><body><h1>This webpage is Down for Maintenance</h1>Please try again later.</body></html>" > index.html
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: build/documentation/
retention-days: 1
deploy:
runs-on: ubuntu-24.04
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4