Skip to content

ci: deploy docs via Ddraig SSG (#52) #1

ci: deploy docs via Ddraig SSG (#52)

ci: deploy docs via Ddraig SSG (#52) #1

Workflow file for this run

name: GitHub Pages (Ddraig SSG)
on:
push:
branches: [main, master]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
container:
image: ghcr.io/stefan-hoeck/idris2-pack@sha256:f0758996a931fb35d9ecb1de273c4d59dabe2a09b433afc7e357f65a08b7e1ff
steps:
- name: Checkout Site
uses: actions/checkout@v4
- name: Checkout Ddraig SSG
uses: actions/checkout@v4
with:
repository: hyperpolymath/ddraig-ssg
path: .ddraig-ssg
- name: Compile Ddraig
working-directory: .ddraig-ssg
run: idris2 Ddraig.idr -o ddraig
- name: Build site
run: |
mkdir -p src
if [ ! -f src/index.md ] && [ -f README.md ]; then
cp README.md src/index.md
elif [ ! -f src/index.md ]; then
echo "# ${GITHUB_REPOSITORY}" > src/index.md
fi
./.ddraig-ssg/build/exec/ddraig build src _site https://hyperpolymath.github.io/${GITHUB_REPOSITORY#*/}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_site'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
timeout-minutes: 15
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4