mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2024-11-19 08:08:05 +08:00
Compare commits
4 Commits
v4.1.8
...
e923ff605c
Author | SHA1 | Date | |
---|---|---|---|
|
e923ff605c | ||
|
cf583aab4f | ||
|
3405be3b42 | ||
|
e7f0312c8c |
@@ -83,7 +83,7 @@ or use the latest version from a branch, eg: ssh-deploy@main
|
||||
```
|
||||
- name: Deploy to Staging server
|
||||
uses: easingthemes/ssh-deploy@main
|
||||
env:
|
||||
with:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
ARGS: "-rlgoDzvc -i"
|
||||
SOURCE: "dist/"
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
run: npm run build --if-present
|
||||
- name: Deploy to Server
|
||||
uses: easingthemes/ssh-deploy@main
|
||||
env:
|
||||
with:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
ARGS: "-rlgoDzvc -i --delete"
|
||||
SOURCE: "dist/"
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
15
package-lock.json
generated
15
package-lock.json
generated
@@ -1,14 +1,15 @@
|
||||
{
|
||||
"name": "@draganfilipovic/ssh-deploy",
|
||||
"version": "4.1.7",
|
||||
"version": "4.1.8",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@draganfilipovic/ssh-deploy",
|
||||
"version": "4.1.7",
|
||||
"version": "4.1.8",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"os": "^0.1.2",
|
||||
"rsyncwrapper": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -1483,6 +1484,11 @@
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/os": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/os/-/os-0.1.2.tgz",
|
||||
"integrity": "sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ=="
|
||||
},
|
||||
"node_modules/p-limit": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||
@@ -3061,6 +3067,11 @@
|
||||
"word-wrap": "^1.2.3"
|
||||
}
|
||||
},
|
||||
"os": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/os/-/os-0.1.2.tgz",
|
||||
"integrity": "sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ=="
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||
|
@@ -30,6 +30,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/easingthemes/ssh-deploy#readme",
|
||||
"dependencies": {
|
||||
"os": "^0.1.2",
|
||||
"rsyncwrapper": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
const { join } = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
const { writeToFile } = require('./helpers');
|
||||
const { EOL } = require('os');
|
||||
|
||||
const KNOWN_HOSTS = 'known_hosts';
|
||||
const getPrivateKeyPath = (filename = '') => {
|
||||
@@ -19,7 +20,7 @@ const addSshKey = (content, deployKeyName) => {
|
||||
const { dir, filename } = getPrivateKeyPath(deployKeyName);
|
||||
writeToFile({ dir, filename: KNOWN_HOSTS, content: '' });
|
||||
console.log('✅ [SSH] known_hosts file ensured', dir);
|
||||
writeToFile({ dir, filename, content: `${content}\r\n`, isRequired: true, mode: '0400' });
|
||||
writeToFile({ dir, filename, content: `${content}${EOL}`, isRequired: true, mode: '0400' });
|
||||
console.log('✅ [SSH] key added to `.ssh` dir ', dir, filename);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user