mirror of
https://github.com/tcgdex/compiler.git
synced 2025-04-22 02:32:10 +00:00
* Done ! Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net> * ACT doesn't wanna work so I push Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net> * Continued work on ESLint Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net> * Two files remaining Signed-off-by: Avior <github@avior.me> * Fixed set cards not found when using ids Signed-off-by: Avior <florian.bouillon@delta-wings.net>
23 lines
536 B
TypeScript
23 lines
536 B
TypeScript
import { config } from 'dotenv'
|
|
import { ConnectConfig } from 'ssh2'
|
|
import SFTPPromise from './SFTPPromise'
|
|
|
|
config()
|
|
|
|
const sshConfig: ConnectConfig = {
|
|
host: process.env.UPLOAD_REMOTE,
|
|
password: process.env.UPLOAD_PASSWORD,
|
|
port: 22,
|
|
username: process.env.UPLOAD_USERNAME
|
|
}
|
|
|
|
;(async () => {
|
|
const client = new SFTPPromise(sshConfig)
|
|
// client.debug = true
|
|
await client.connect()
|
|
const src = `${__dirname}/dist`
|
|
const dst = process.env.UPLOAD_DIST as string
|
|
await client.uploadDir(src, dst, /\.git/gu)
|
|
process.exit(0)
|
|
})()
|