Skip to content

Instantly share code, notes, and snippets.

@fernfernfern
Last active June 8, 2022 01:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fernfernfern/28137207242fa0ea77516be37fb3d5f8 to your computer and use it in GitHub Desktop.
Save fernfernfern/28137207242fa0ea77516be37fb3d5f8 to your computer and use it in GitHub Desktop.
version: 2.1
jobs:
test:
machine: true
steps:
- run: echo "Test can run here!"
deploy:
machine: true
steps:
- run: echo "The deploy steps"
# handlers:
# - url: /favicon\.ico
# static_files: favicon.ico
# upload: favicon\.ico
# - url: /static
# static_dir: public
# - url: /.*
# secure: always
# redirect_http_response_code: 301
# script: auto
# steps:
# - run:
# name: Install Java & Maven
# command: ssh $SSH_USER@$SSH_HOST "sudo apt-get update && sudo apt-get install -y curl git && sudo apt-get install -y openjdk-8-jdk && sudo apt-get install -y maven"
# - run:
# name: Clone Repo & Install Application Dependencies
# command: ssh $SSH_USER@$SSH_HOST "git clone https://github.com/my-name/my-application.git && cd ~/project-path"
# - run:
# name: Deploy Application
# command: ssh $SSH_USER@$SSH_HOST "cd ~/project-path&& mvn verify"
# - run:
# name: Run application
# command: ssh $SSH_USER@$SSH_HOST "cd ~/project-path && mvn -Dmaven.test.skip=true spring-boot:run"
workflows:
version: 2.1
test-and-deploy:
jobs:
- test
# - handlers
- deploy:
requires:
- test
# - handlers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment