mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
chore: upload to AWS S3 for each version tag (#178)
* chore: add deployment action * chore: add secrets * chore: trigger build * chore: add try/catch and rename profile arg * chore: trigger deployment on tag with version * chore: remove deployment from prebublish script * fix: regexp * fix: glob instead of regexp on tag * chore: add caching of node_modules for bundling
This commit is contained in:
@@ -12,13 +12,18 @@ execSync(`tar -zcvf ${fileNameLatest} dist`);
|
||||
|
||||
|
||||
const argv = yargs
|
||||
.option('aws_profile', {
|
||||
.option('aws-profile', {
|
||||
alias: 'p',
|
||||
type: 'string',
|
||||
})
|
||||
.argv;
|
||||
|
||||
let profile = !!argv.aws_profile ? `--profile ${argv.aws_profile}` : '';
|
||||
let profile = !!argv.awsProfile ? `--profile ${argv.awsProfile}` : '';
|
||||
|
||||
try {
|
||||
execSync(`aws s3 cp ${fileName} s3://openapi-cli-dist ${profile}`);
|
||||
execSync(`aws s3 cp ${fileNameLatest} s3://openapi-cli-dist ${profile}`);
|
||||
} catch (e) {
|
||||
process.stderr.write(e.output);
|
||||
}
|
||||
|
||||
execSync(`aws s3 cp ${fileName} s3://openapi-cli-dist ${profile}`);
|
||||
execSync(`aws s3 cp ${fileNameLatest} s3://openapi-cli-dist ${profile}`);
|
||||
Reference in New Issue
Block a user