Skip to content

Commit 042bf22

Browse files
committed
chore: actions
1 parent d15acfc commit 042bf22

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
with:
1818
node-version: '14'
1919
- run: yarn
20-
- run: yarn posts:ci --token=${{ secrets.GG_TOKEN }}
20+
- run: yarn posts --token=${{ secrets.GG_TOKEN }} --owner=${{ secrets.GG_USER }} --repo=${{ secrets.GG_REPO }} --issues-owner=${{ secrets.GG_ISSUES_USER }} --issues-repo=${{ secrets.GG_ISSUES_REPO }} --type=${{ secrets.GG_TYPE }}
2121
- run: yarn reconf
2222
- run: yarn build
2323
- run: yarn copy

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"rgd": "rgd",
2121
"deploy": "node ./scripts/deploy",
2222
"posts": "rgd --mode=json,rss --jsonfmt=true --outdir=discussions",
23-
"posts:ci": "rgd",
2423
"reconf": "node ./scripts/reconf",
2524
"reset": "node ./scripts/reset",
2625
"copy": "node ./scripts/copy"
@@ -53,4 +52,4 @@
5352
"@types/body-scroll-lock": "^3.1.0",
5453
"rgd": "^2.0.2"
5554
}
56-
}
55+
}

scripts/reconf.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,8 @@ function cnameUpdate() {
101101
function pkgUpdate() {
102102
pkg.name = rgdConf.repo;
103103
pkg.description = rgdConf.description || rgdConf.website?.description;
104-
let issuesInfo = '';
105-
if (rgdConf.issues_owner && rgdConf.issues_repo) {
106-
let _type = 'discussions';
107-
if (rgdConf.type === 'issues') _type = 'issues';
108-
issuesInfo = ` --issues-owner=${rgdConf.issues_owner} --issues-repo=${rgdConf.issues_repo} --type=${_type}`;
109-
}
110-
pkg.scripts[
111-
'posts:ci'
112-
] = `rgd --owner=${rgdConf.owner} --repo=${rgdConf.repo} --mode=json,rss --jsonfmt=true --outdir=discussions${issuesInfo}`;
113104

114-
fs.writeFile('package.json', JSON.stringify(pkg, null, 2), function (err) {
105+
fs.writeFile('package.json', JSON.stringify(pkg, null, 2), (err) => {
115106
if (err) return;
116107
console.log(chalk.gray`[init]`, chalk.yellow`package.json`);
117108
});

scripts/reset.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ function cnameReset() {
3333
function pkgReset() {
3434
pkg.name = 'gg';
3535
pkg.description = 'A gatsby website builder based on github discussions';
36-
pkg.scripts['posts:ci'] = 'rgd';
3736

3837
fs.writeFile('package.json', JSON.stringify(pkg, null, 2), function (err) {
3938
if (err) return;

0 commit comments

Comments
 (0)