initial attempt

This commit is contained in:
Bret Comnes 2020-02-10 13:37:23 -07:00
parent d220af8299
commit f288fd1650
No known key found for this signature in database
GPG Key ID: 3705F4634DC3A1AC
2 changed files with 4 additions and 16 deletions

View File

@ -5,9 +5,8 @@ const path = require('path')
const exec = require('child_process').exec const exec = require('child_process').exec
async function doDeploy () { async function doDeploy () {
// `who-to-greet` input defined in action metadata file
const token = core.getInput('api-token') const token = core.getInput('api-token')
const distDir = core.getInput('dist-dir') const distDir = path.join(process.cwd(), core.getInput('dist-dir'))
const cleanup = core.getInput('cleanup') const cleanup = core.getInput('cleanup')
const time = (new Date()).toTimeString() const time = (new Date()).toTimeString()
@ -15,21 +14,10 @@ async function doDeploy () {
const client = new Neocities(token) const client = new Neocities(token)
console.log(process.cwd()) return client.deploy(distDir, {
console.log(path.join(process.cwd(), distDir)) cleanup,
statusCb: console.log
return new Promise((resolve, reject) => {
exec('ls -la', (error, stdout, stderr) => {
console.log(stdout)
console.log(stderr)
if (error !== null) {
console.log(`exec error: ${error}`)
}
resolve()
})
}) })
// return client.deploy()
} }
doDeploy().then(() => {}).catch(err => { doDeploy().then(() => {}).catch(err => {