A design system in a box. hip-ui.tngl.io/docs/introduction
0
fork

Configure Feed

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

try this

+29 -2
+8 -1
.tangled/workflows/docs.yml
··· 1 1 engine: "nixery" 2 + 2 3 when: 3 4 - event: ["push", "manual"] 4 5 branch: ["main"] 6 + 5 7 dependencies: 6 8 nixpkgs: 7 9 - nodejs 8 10 - gnused 11 + - openssh 12 + 9 13 steps: 10 14 - name: "Enable Corepack" 11 15 command: "corepack enable && corepack prepare pnpm@10.18.2 --activate" ··· 16 20 - name: "Build docs" 17 21 command: "pnpm --filter docs build" 18 22 23 + - name: "Configure SSH" 24 + command: "test -n \"$SSH_KEY\" && export HOME=/tmp/hip-ui-home USER=root LOGNAME=root USERNAME=root && mkdir -p \"$HOME/.ssh\" && chmod 700 \"$HOME/.ssh\" && : > \"$HOME/.ssh/known_hosts\" && chmod 600 \"$HOME/.ssh/known_hosts\" && printf '%s\n' \"$SSH_KEY\" | sed 's/\r$//' > \"$HOME/.ssh/deploy_key\" && chmod 600 \"$HOME/.ssh/deploy_key\"" 25 + 19 26 - name: "Publish docs" 20 - command: "pnpm publish-docs" 27 + command: "export HOME=/tmp/hip-ui-home USER=root LOGNAME=root USERNAME=root && GIT_SSH_COMMAND='ssh -F /dev/null -i /tmp/hip-ui-home/.ssh/deploy_key -o IdentitiesOnly=yes -o UserKnownHostsFile=/tmp/hip-ui-home/.ssh/known_hosts -o StrictHostKeyChecking=accept-new' pnpm publish-docs"
+21 -1
scripts/publish-docs.ts
··· 11 11 process.env.DOCS_DIST_DIR ?? "apps/docs/dist/client", 12 12 ); 13 13 14 + function getDeployRemoteUrl(remoteUrl: string) { 15 + if (process.env.DOCS_PUSH_REMOTE_URL) { 16 + return process.env.DOCS_PUSH_REMOTE_URL; 17 + } 18 + 19 + if (!URL.canParse(remoteUrl)) { 20 + return remoteUrl; 21 + } 22 + 23 + const url = new URL(remoteUrl); 24 + 25 + if (url.protocol !== "http:" && url.protocol !== "https:") { 26 + return remoteUrl; 27 + } 28 + 29 + const pathname = url.pathname.replace(/\/+$/, ""); 30 + return `ssh://git@${url.host}${pathname}`; 31 + } 32 + 14 33 function run(command: string, args: Array<string>, cwd: string) { 15 34 execFileSync(command, args, { 16 35 cwd, ··· 34 53 cwd: process.cwd(), 35 54 encoding: "utf8", 36 55 }).trim(); 56 + const deployRemoteUrl = getDeployRemoteUrl(remoteUrl); 37 57 const commitSha = execFileSync("git", ["rev-parse", "--short", "HEAD"], { 38 58 cwd: process.cwd(), 39 59 encoding: "utf8", ··· 57 77 ], 58 78 publishDir, 59 79 ); 60 - run("git", ["remote", "add", "deploy", remoteUrl], publishDir); 80 + run("git", ["remote", "add", "deploy", deployRemoteUrl], publishDir); 61 81 run("git", ["push", "--force", "deploy", `HEAD:${branch}`], publishDir); 62 82 } finally { 63 83 await rm(tempDir, { recursive: true, force: true });