Skip to content

Instantly share code, notes, and snippets.

@princefishthrower
Created February 1, 2021 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save princefishthrower/1aae30d87cbc1447a70cd5471d256139 to your computer and use it in GitHub Desktop.
Save princefishthrower/1aae30d87cbc1447a70cd5471d256139 to your computer and use it in GitHub Desktop.
pipelines:
branches:
master:
- step:
name: Install npm modules and build production site via tsc
script:
- npm install
- tsc
artifacts:
- node_modules/**
- dist/**
- index.js
- step:
name: Deploy dist artifacts using SCP
deployment: production
script:
- pipe: atlassian/scp-deploy:0.3.3
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: '/var/www/your-first-pipeline-site/html'
LOCAL_PATH: 'dist/*'
- step:
name: Deploy npm_modules artifacts using SCP
deployment: production
script:
- pipe: atlassian/scp-deploy:0.3.3
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: '/var/www/your-first-pipeline-site'
LOCAL_PATH: 'npm_modules/*'
- step:
name: Deploy index.js artifact using SCP
deployment: production
script:
- pipe: atlassian/scp-deploy:0.3.3
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: '/var/www/your-first-pipeline-site'
LOCAL_PATH: 'index.js'
- step:
name: SSH to project root on server and start Node.js process
script:
- ssh $USER@$SERVER 'cd /var/www/your-first-pipeline-site && node index.js`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment