Skip to content

Remove Monog

Remove Monog #8

name: Deploy Secrets Production
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M-%S')"
- name: Checkout source code
uses: actions/checkout@v2
# - name: Update task file
# run: sed -e 's/{AWS_ACCESS_KEY_ID}/'${{ secrets.ALERT_AWS_ACCESS_KEY_ID }}'/g' -e 's/{AWS_SECRET_ACCESS_KEY}/'${{ secrets.ALERT_AWS_SECRET_ACCESS_KEY }}'/g' -e 's/{APP_NAME}/Secrets Service/g' -e 's/{APP_ENV}/Production/g' tasks/diskUsageAlert.sh > tasks/diskUsageAlert.cron
- name: Generate deployment package
run: zip -r deploy.zip . -x '*.git*'
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v16
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: secrets
environment_name: secrets-production-v2
version_label: secrets-production-${{github.run_number}}-${{steps.date.outputs.date}}
region: us-east-1
deployment_package: deploy.zip
slackNotification:
needs: deploy
name: Slack Notification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: "Deploy Bot (Secrets)"
SLACK_CHANNEL: "severalbrands-web-notifications"
SLACK_ICON: "https://s3.eu-west-1.amazonaws.com/cdn.severalbrands.com/deploy-assets/deploy-bot.jpeg"
SLACK_FOOTER: "Powered By: SeveralBrands tech team 🚀"