Created
February 1, 2021 12:39
-
-
Save princefishthrower/1aae30d87cbc1447a70cd5471d256139 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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