This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
Update README.md #266
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
--- | |
name: 'Deploy: Beta' | |
on: | |
push: | |
branches: | |
- main | |
env: | |
AWS_REGION: eu-central-1 | |
AWS_LIGHTSAIL_SERVICE_NAME: ${{ secrets.AWS_LIGHTSAIL_SERVICE_NAME }} | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: Beta | |
env: | |
NODE_ENV: ${{ secrets.ENV_NODE_ENV }} | |
DB_HOST: ${{ secrets.ENV_DB_HOST }} | |
DB_USER: ${{ secrets.ENV_DB_USER }} | |
DB_PASSWORD: ${{ secrets.ENV_DB_PASSWORD }} | |
DB_NAME: ${{ secrets.ENV_DB_NAME }} | |
APP_KEY: ${{ secrets.ENV_APP_KEY }} | |
API_URL: ${{ secrets.ENV_API_URL }} | |
APP_URL: ${{ secrets.ENV_APP_URL }} | |
FROM_EMAIL: ${{ secrets.ENV_FROM_EMAIL }} | |
SMTP_HOST: ${{ secrets.ENV_SMTP_HOST }} | |
SMTP_PORT: ${{ secrets.ENV_SMTP_PORT }} | |
SMTP_USERNAME: ${{ secrets.ENV_SMTP_USERNAME }} | |
SMTP_PASSWORD: ${{ secrets.ENV_SMTP_PASSWORD }} | |
CACHE_VIEWS: false | |
S3_KEY: ${{ secrets.ENV_S3_KEY }} | |
S3_SECRET: ${{ secrets.ENV_S3_SECRET }} | |
S3_REGION: ${{ secrets.ENV_S3_REGION }} | |
S3_BUCKET: ${{ secrets.ENV_S3_BUCKET }} | |
steps: | |
- name: Cloning repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install Utilities | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y jq unzip | |
- name: Install AWS CLI | |
run: ./scripts/install-aws-cli.sh | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: ${{ env.AWS_REGION }} | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Build and push Docker Image | |
run: ./scripts/build-and-push-docker-image.sh | |
- name: Push and Deploy | |
run: ./scripts/update-container-service.sh |