[READ-ONLY] Mirror of https://github.com/flo-bit/tiny-docs. quick setup, simple, minimalistic docs for your github project flo-bit.dev/tiny-docs/
0

Configure Feed

Select the types of activity you want to include in your feed.

test-17

+16 -15
+16 -15
.github/workflows/tiny-docs.yml
··· 71 71 - name: Create docs/config.json if missing 72 72 shell: bash 73 73 run: | 74 - set -euo pipefail 75 - mkdir -p docs 76 - if [ ! -f docs/config.json ]; then 77 - cat > docs/config.json <<'JSON' 78 - { 79 - "site": "__SITE__", 80 - "base": "__BASE__", 81 - "name": "__NAME__" 82 - } 83 - JSON 84 - sed -i "s|__SITE__|${{ steps.derive.outputs.site }}|g" docs/config.json 85 - sed -i "s|__BASE__|${{ steps.derive.outputs.base }}|g" docs/config.json 86 - sed -i "s|__NAME__|${{ steps.derive.outputs.name }}|g" docs/config.json 74 + set -euo pipefail 75 + mkdir -p docs 76 + if [ ! -f docs/config.json ]; then 77 + SITE='${{ steps.derive.outputs.site }}' 78 + BASE='${{ steps.derive.outputs.base }}' 79 + NAME='${{ steps.derive.outputs.name }}' 80 + 81 + if command -v jq >/dev/null 2>&1; then 82 + jq -n --arg site "$SITE" --arg base "$BASE" --arg name "$NAME" \ 83 + '{site:$site, base:$base, name:$name}' > docs/config.json 84 + else 85 + printf '{\n "site": "%s",\n "base": "%s",\n "name": "%s"\n}\n' \ 86 + "$SITE" "$BASE" "$NAME" > docs/config.json 87 + fi 87 88 echo "Created docs/config.json" 88 - else 89 + else 89 90 echo "docs/config.json already exists; leaving it unchanged." 90 - fi 91 + fi 91 92 92 93 - name: Install, build, and upload the site artifact 93 94 uses: withastro/action@v3