-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up Github action for prod deploys
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Deploy to Aptible Prod | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: { } | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to aptible-prod | ||
runs-on: ubuntu-latest | ||
environment: prod | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: webfactory/ssh-agent@v0.9.0 | ||
with: | ||
ssh-private-key: ${{ secrets.APTIBLE_GIT_SSH_KEY }} | ||
- name: Deploy Using Aptible CLI | ||
run: | | ||
ssh-keyscan beta.aptible.com >> ~/.ssh/known_hosts | ||
wget -O aptible-package https://omnibus-aptible-toolbelt.s3.amazonaws.com/aptible/omnibus-aptible-toolbelt/master/206/pkg/aptible-toolbelt_0.16.5%2B20200508143656~ubuntu.16.04-1_amd64.deb | ||
sudo dpkg -i aptible-package | ||
aptible login \ | ||
--email='${{ secrets.APTIBLE_USERNAME }}' \ | ||
--password='${{ secrets.APTIBLE_PASSWORD}}' | ||
git push --force ${{ vars.PROD_APTIBLE_REMOTE_URL }} ${GITHUB_SHA}:${{ vars.PROD_APTIBLE_REMOTE_BRANCH }} | ||
aptible deploy \ | ||
--app sn-md-pilot-prod \ | ||
--git-commitish ${GITHUB_SHA} \ | ||
'SPRING_DATASOURCE_URL=${{ secrets.PROD_SPRING_DATASOURCE_URL }}' \ | ||
'SPRING_DATASOURCE_USERNAME=${{ secrets.PROD_SPRING_DATASOURCE_USERNAME }}' \ | ||
'SPRING_DATASOURCE_PASSWORD=${{ secrets.PROD_SPRING_DATASOURCE_PASSWORD }}' \ | ||
'SPRING_PROFILES_ACTIVE=prod' \ | ||
'AWS_ACCESS_KEY=${{ secrets.PROD_AWS_ACCESS_KEY }}' \ | ||
'AWS_BUCKET=${{ vars.PROD_AWS_BUCKET }}' \ | ||
'AWS_CMK=${{ secrets.PROD_AWS_CMK }}' \ | ||
'AWS_SECRET_KEY=${{ secrets.PROD_AWS_SECRET_KEY }}' \ | ||
'MAILGUN_KEY=${{ secrets.PROD_MAILGUN_KEY }}' \ | ||
'MIXPANEL_API_KEY=${{ secrets.PROD_MIXPANEL_API_KEY }}' \ | ||
'SMARTY_AUTH_ID=${{ secrets.SMARTY_AUTH_ID }}' \ | ||
'SMARTY_AUTH_TOKEN=${{ secrets.SMARTY_AUTH_TOKEN }}' \ | ||
'ENCRYPTION_KEYSET=${{ secrets.PROD_ENCRYPTION_KEYSET }}' \ | ||
'DEFAULT_LOCALE=en' \ | ||
'demo=true' \ | ||
'FORCE_SSL=true' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
spring: | ||
thymeleaf: | ||
cache: true | ||
session: | ||
jdbc: | ||
initialize-schema: always | ||
management: | ||
endpoints: | ||
enabled-by-default: false |