const GhostAdminAPI = require('@tryghost/admin-api'); function uploader(done) { const filename = require('./package.json').name + '.zip'; const api = new GhostAdminAPI({ // Replace URL with your own url: 'http://localhost:2368', version: "v3", // Obtain API key by creating a new integration at http://localhost:2368/ghost/#/settings/integrations key: '86858839df28e6ffaec6b765:f819fbb7b9985fa6ac58086bb50d7ca2aea8a0f09201b40ecb7973457e03b87d' }); let data = { file: `./dist/${filename}` } return api.themes.upload(data) .catch(done); } const build = series(css, js); exports.deploy = series(build, zipper, uploader); function css(done) { // Omitted because it's in a regular Casper theme } function js(done) { // Omitted because it's in a regular Casper theme } function zipper(done) { // Omitted because it's in a regular Casper theme }