create-preview-workflow 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/index.js +3 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -12,11 +12,7 @@ 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
- },
15
+
20
16
  ]);
21
17
 
22
18
  const workflow = `# .github/workflows/sync.yml
@@ -42,7 +38,7 @@ jobs:
42
38
 
43
39
  - name: Clone target repo
44
40
  run: |
45
- git clone https://${response.token}@github.com/ssm123ssm/preview.git
41
+ git clone https://${{ secrets.GH_SYNC_TOKEN }}@github.com/ssm123ssm/preview.git
46
42
  rm -rf preview/public/protected/\$DIR
47
43
  mkdir -p preview/public/protected/\$DIR
48
44
  cp -r ${response.sourcePath}/. preview/public/protected/\$DIR/
@@ -63,6 +59,6 @@ jobs:
63
59
  fs.writeFileSync(path.join(destDir, "sync.yml"), workflow);
64
60
 
65
61
  console.log(
66
- "✅ GitHub Actions workflow for Preview created at .github/workflows/sync.yml"
62
+ "✅ 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
63
  );
68
64
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-preview-workflow",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "bin": {
5
5
  "create-preview-workflow": "index.js"
6
6
  },