|
2 | 2 |
|
3 | 3 | set -e -x |
4 | 4 |
|
5 | | -apk add --no-progress --quiet ytt |
| 5 | +apk add git |
6 | 6 |
|
7 | 7 | git config --global user.email "concourseteam+concourse-github-bot@gmail.com" |
8 | 8 | git config --global user.name "Concourse Bot" |
9 | 9 |
|
| 10 | +# Change to the docs repo |
10 | 11 | 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 |
15 | 16 |
|
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 |
20 | 20 |
|
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 |
25 | 23 |
|
26 | | - ./scripts/build |
| 24 | + # Copy well-known for BlueSky |
| 25 | + cp -R .well-known site/.well-known |
27 | 26 |
|
28 | 27 | 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 | + |
29 | 43 | git add -A |
30 | 44 | git commit --allow-empty -m "build" |
31 | 45 | fi |
|
0 commit comments