-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.ts
More file actions
executable file
·30 lines (23 loc) · 833 Bytes
/
publish.ts
File metadata and controls
executable file
·30 lines (23 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env -S yarn dlx tsx
import "zx/globals";
import { getPublishRemote } from "@n8v/scripts/utils/get-publish-remote";
import { workDirs } from "@n8v/scripts/utils/work-dirs";
const Constants = {
user: {
email: "dagger-bot@users.noreply.github.com",
name: "Dagger Bot",
},
};
$.verbose = true;
cd(workDirs.apps.app.path);
try {
await $`git config --get user.name`;
} catch {
// Git config --global user.email "dagger-bot@users.noreply.github.com"
await $`git config --global user.email ${Constants.user.email}`;
// Git config --global user.name "Dagger Bot"
await $`git config --global user.name ${Constants.user.name}`;
}
const remote = getPublishRemote();
$.env.GH_REMOTE = remote;
await $`yarn dlx gh-pages --dist ${workDirs.apps.app.public.path} --repo $GH_REMOTE --dotfiles --message "chore: publish"`;