create-preview-workflow 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -7
- package/package.json +1 -1
package/index.js
CHANGED
@@ -12,11 +12,6 @@ const prompts = require("prompts");
|
|
12
12
|
message:
|
13
13
|
"Enter the source directory to sync (e.g., 2_scripts) without leading slash:",
|
14
14
|
},
|
15
|
-
{
|
16
|
-
type: "text",
|
17
|
-
name: "token",
|
18
|
-
message: "Enter your GitHub personal access token:",
|
19
|
-
},
|
20
15
|
]);
|
21
16
|
|
22
17
|
const workflow = `# .github/workflows/sync.yml
|
@@ -42,7 +37,7 @@ jobs:
|
|
42
37
|
|
43
38
|
- name: Clone target repo
|
44
39
|
run: |
|
45
|
-
git clone https
|
40
|
+
git clone https://\${{ secrets.GH_SYNC_TOKEN }}@github.com/ssm123ssm/preview.git
|
46
41
|
rm -rf preview/public/protected/\$DIR
|
47
42
|
mkdir -p preview/public/protected/\$DIR
|
48
43
|
cp -r ${response.sourcePath}/. preview/public/protected/\$DIR/
|
@@ -63,6 +58,6 @@ jobs:
|
|
63
58
|
fs.writeFileSync(path.join(destDir, "sync.yml"), workflow);
|
64
59
|
|
65
60
|
console.log(
|
66
|
-
"✅ GitHub Actions workflow for Preview created at .github/workflows/sync.yml"
|
61
|
+
"✅ GitHub Actions workflow for Preview created at .github/workflows/sync.yml. Make sure to add the GH_SYNC_TOKEN secret in your repository settings."
|
67
62
|
);
|
68
63
|
})();
|