Skip to content

Commit 3ae2c8b

Browse files
committed
ci: add ci from zensical branch
Signed-off-by: Kevin Bimonte <kbimonte@gmail.com>
1 parent 6842e2d commit 3ae2c8b

File tree

4 files changed

+30
-26
lines changed

4 files changed

+30
-26
lines changed
File renamed without changes.

ci/build

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,44 @@
22

33
set -e -x
44

5-
apk add --no-progress --quiet ytt
5+
apk add git
66

77
git config --global user.email "concourseteam+concourse-github-bot@gmail.com"
88
git config --global user.name "Concourse Bot"
99

10+
# Change to the docs repo
1011
pushd docs
11-
if [ -e .git ] && git remote | grep origin >/dev/null; then
12-
# undo single-branch clone and fetch gh-pages
13-
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
14-
git fetch origin gh-pages
12+
# Install dependencies
13+
pip install zensical nodeenv
14+
nodeenv env --node=22.21.1
15+
npm ci
1516

16-
ref=$(git rev-parse HEAD)
17-
git checkout gh-pages
18-
git pull
19-
git merge --no-edit $ref
17+
# Remove apps before build
18+
rm -rf docs/libs/examples/apps/
19+
rm -rf docs/libs/examples/**/*.md
2020

21-
# clear out old content
22-
git rm *.html || true
23-
git rm search_index.json || true
24-
fi
21+
# Create site directory
22+
npm run build
2523

26-
./scripts/build
24+
# Copy well-known for BlueSky
25+
cp -R .well-known site/.well-known
2726

2827
if [ -e .git ]; then
28+
git checkout gh-pages
29+
git rm -rf .
30+
31+
rm -rf venv/ node_modules/ env/ .cache/ overrides/ docs/ .idea/
32+
33+
mv site/{.,}* .
34+
rmdir site
35+
36+
# Create CNAME file
37+
echo -n "concourse-ci.org" > CNAME
38+
39+
# Create robots.txt file
40+
echo "User-agent: *" > robots.txt
41+
echo -n "Disallow: /single-page.html" >> robots.txt
42+
2943
git add -A
3044
git commit --allow-empty -m "build"
3145
fi

ci/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ platform: linux
44
image_resource:
55
type: registry-image
66
source:
7-
repository: 3.14-alpine3.21
7+
repository: python
8+
tag: 3.14-alpine3.21
89

910
inputs:
1011
- name: docs

scripts/build

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)