diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-26 15:50:31 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-26 15:50:31 +0200 |
| commit | d50db372c93af9f55e670fddf7015975a0e247c4 (patch) | |
| tree | 8059f9eff6f3e64387a101dce266b6075437231d /lib | |
| parent | d87e5802b587e32aa6dc55d27ef54ff52ea4e6ab (diff) | |
Use rsync instead of aws for ephemeral blog
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/blog.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/blog.js b/lib/blog.js index 6923a10..05c1ab6 100644 --- a/lib/blog.js +++ b/lib/blog.js @@ -108,9 +108,9 @@ module.exports = class Blog { * @return {Promise<undefined>} empty promise, returns no value * @instance */ - async publish(bucket) { + async publish(host) { - internals.debuglog(`Publishing to ${bucket}`); + internals.debuglog(`Publishing to ${host}`); try { await internals.exec('which aws'); } @@ -119,8 +119,8 @@ module.exports = class Blog { } try { - await internals.exec(`aws s3 sync --acl public-read --delete ${this.staticDirectory} s3://${bucket}`); - await internals.exec(`aws s3 cp --content-type 'text/plain; charset=utf-8 ' --acl public-read ${this.staticDirectory}/index.txt s3://${bucket}`); + internals.debuglog(`Copying ephemeral blog from ${this.staticDirectory}`); + await internals.exec(`rsync -r ${this.staticDirectory}/ ${host}`); } catch (err) { console.error('Failed to publish'); @@ -151,7 +151,7 @@ module.exports = class Blog { try { const gemlogPath = resolve(join(__dirname, '../', '.gemlog')); - internals.debuglog(`Reading archive from ${gemlogPath}`); + internals.debuglog(`Copying archive from ${gemlogPath}`); await internals.exec(`rsync -r ${gemlogPath}/ ${host}`); } catch (err) { |