Skip to content

chore(ci): repoint push-email-notify to smtp-notify-action (#22) #22

chore(ci): repoint push-email-notify to smtp-notify-action (#22)

chore(ci): repoint push-email-notify to smtp-notify-action (#22) #22

Workflow file for this run

# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
# This workflow is managed by gh actions-lock.
name: GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Checkout casket-ssg
uses: actions/checkout@v4.1.1
with:
repository: hyperpolymath/casket-ssg
path: .casket-ssg
- name: Setup GHCup
uses: haskell-actions/setup@v2.7.5
with:
ghc-version: '9.8.2'
cabal-version: '3.10'
- name: Cache Cabal
uses: actions/cache@v4.3.0
with:
path: |
~/.cabal/packages
~/.cabal/store
.casket-ssg/dist-newstyle
key: ${{ runner.os }}-casket-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}
- name: Build casket-ssg
working-directory: .casket-ssg
run: cabal build
- name: Build site
run: |
mkdir -p site _site
# Generate index.md from README if site/index.md doesn't exist
if [ ! -f site/index.md ]; then
if [ -f README.adoc ]; then
# Convert AsciiDoc to Markdown (basic conversion)
echo "---" > site/index.md
echo "title: $(basename $PWD)" >> site/index.md
echo "date: $(date +%Y-%m-%d)" >> site/index.md
echo "---" >> site/index.md
cat README.adoc >> site/index.md
elif [ -f README.md ]; then
echo "---" > site/index.md
echo "title: $(basename $PWD)" >> site/index.md
echo "date: $(date +%Y-%m-%d)" >> site/index.md
echo "---" >> site/index.md
cat README.md >> site/index.md
else
echo "---" > site/index.md
echo "title: $(basename $PWD)" >> site/index.md
echo "date: $(date +%Y-%m-%d)" >> site/index.md
echo "---" >> site/index.md
echo "" >> site/index.md
echo "# $(basename $PWD)" >> site/index.md
echo "" >> site/index.md
echo "Documentation coming soon." >> site/index.md
fi
fi
cd .casket-ssg && cabal run casket-ssg -- build ../site ../_site
- name: Setup Pages
uses: actions/configure-pages@v5.0.0
- name: Upload artifact
uses: actions/upload-pages-artifact@v3.0.1
with:
path: '_site'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4.0.5