Skip to content

Commit e78ccf5

Browse files
committed
fix(ci): replace casket-pages with standard Jekyll Pages workflow
1 parent a7be00f commit e78ccf5

File tree

1 file changed

+5
-79
lines changed

1 file changed

+5
-79
lines changed

.github/workflows/casket-pages.yml

Lines changed: 5 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -20,89 +20,15 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
24-
25-
- name: Checkout casket-ssg
26-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
27-
with:
28-
repository: hyperpolymath/casket-ssg
29-
path: .casket-ssg
30-
31-
- name: Setup GHCup
32-
uses: haskell-actions/setup@f9150cb1d140e9a9271700670baa38991e6fa25c # v2
33-
with:
34-
ghc-version: '9.8.2'
35-
cabal-version: '3.10'
36-
37-
- name: Cache Cabal
38-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
39-
with:
40-
path: |
41-
~/.cabal/packages
42-
~/.cabal/store
43-
.casket-ssg/dist-newstyle
44-
key: ${{ runner.os }}-casket-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}
45-
46-
- name: Build casket-ssg
47-
working-directory: .casket-ssg
48-
run: cabal build
49-
50-
- name: Prepare site source
51-
shell: bash
52-
run: |
53-
set -euo pipefail
54-
rm -rf .site-src _site
55-
56-
if [ -d site ]; then
57-
cp -R site .site-src
58-
else
59-
mkdir -p .site-src
60-
TODAY="$(date +%Y-%m-%d)"
61-
REPO_NAME="${{ github.event.repository.name }}"
62-
REPO_URL="https://github.com/${{ github.repository }}"
63-
README_URL=""
64-
65-
if [ -f README.md ]; then
66-
README_URL="${REPO_URL}/blob/${{ github.ref_name }}/README.md"
67-
elif [ -f README.adoc ]; then
68-
README_URL="${REPO_URL}/blob/${{ github.ref_name }}/README.adoc"
69-
fi
70-
71-
{
72-
echo "---"
73-
echo "title: ${REPO_NAME}"
74-
echo "date: ${TODAY}"
75-
echo "---"
76-
echo
77-
echo "# ${REPO_NAME}"
78-
echo
79-
echo "Static documentation site for ${REPO_NAME}."
80-
echo
81-
echo "- Source repository: [${{ github.repository }}](${REPO_URL})"
82-
if [ -n "${README_URL}" ]; then
83-
echo "- README: [project README](${README_URL})"
84-
fi
85-
if [ -d docs ]; then
86-
echo "- Docs directory: [docs/](${REPO_URL}/tree/${{ github.ref_name }}/docs)"
87-
fi
88-
echo
89-
echo "Project-specific site content can be added later under site/."
90-
} > .site-src/index.md
91-
fi
92-
93-
- name: Build site
94-
run: |
95-
mkdir -p _site
96-
cd .casket-ssg && cabal run casket-ssg -- build ../.site-src ../_site
97-
touch ../_site/.nojekyll
23+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
9824

9925
- name: Setup Pages
100-
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
26+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
10127

10228
- name: Upload artifact
103-
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
29+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
10430
with:
105-
path: '_site'
31+
path: '.'
10632

10733
deploy:
10834
environment:
@@ -113,4 +39,4 @@ jobs:
11339
steps:
11440
- name: Deploy to GitHub Pages
11541
id: deployment
116-
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
42+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

0 commit comments

Comments
 (0)