Skip to content

Commit

Permalink
ci: merge two ci workflow files into one
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinocroustibat committed May 17, 2024
1 parent 7d4702c commit f8bb2ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 100 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: Deploy to staging when pushing on staging
name: Build and deploy when pushing on staging or main

on:
push:
branches:
- main
- staging
- feat/github-ci

jobs:

deploy-staging:

environment: staging
environment: ${{ github.ref_name == 'main' && 'prod' || 'staging' }}

name: Deploy to staging from ${{ github.ref_name }}/${{ github.sha }}

Expand Down Expand Up @@ -52,7 +53,6 @@ jobs:
run: |
cd ./${{ env.CI_JOB_ID }}
touch .env
echo API_ENDPOINT="https://xxx.execute-api.us-west-2.amazonaws.com" >> .env
echo API_KEY=${{ secrets.API_KEY }} >> .env
echo MATRIX_HOME_SERVER=${{ secrets.MATRIX_HOME_SERVER }} >> .env
echo MATRIX_BOT_USERNAME=${{ secrets.MATRIX_BOT_USERNAME }} >> .env
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
script: |
cd /home/${{ secrets.CI_DEPLOY_USER }}/${{ env.CI_JOB_ID }}
mkdir -p /data/tchapbot
export COMPOSE_FILE=/home/${{ secrets.CI_DEPLOY_USER }}/${{ env.CI_JOB_ID }}/docker-compose.yml
export COMPOSE_PROJECT_NAME=albert-tchapbot
Expand Down
96 changes: 0 additions & 96 deletions .github/workflows/prod.yml

This file was deleted.

0 comments on commit f8bb2ef

Please sign in to comment.