Skip to content

Commit

Permalink
make a 1-1 mapping to github environments and deployed environments. …
Browse files Browse the repository at this point in the history
…Demo should have its own Github environment and not use production
  • Loading branch information
rikukissa committed Dec 18, 2023
1 parent 7a3e48a commit dc53b53
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy(production)
name: Deploy (production)
run-name: Deploy to ${{ github.event.inputs.environment }} core=${{ github.event.inputs.core-image-tag }} country config=${{ github.event.inputs.countryconfig-image-tag }}
on:
workflow_dispatch:
Expand All @@ -7,24 +7,18 @@ on:
type: choice
description: Environment to deploy to
required: true
default: 'production'
default: 'staging'
options:
- production
- staging
core-image-tag:
description: Core DockerHub image tag
required: true
default: 'v1.3.2'
countryconfig-image-tag:
description: Your Country Config DockerHub image tag
required: true
deploy-script-environment:
type: choice
description: Deploy script environment
required: true
default: 'production'
options:
- production
- demo

jobs:
deploy:
environment: ${{ github.event.inputs.environment }}
Expand Down Expand Up @@ -68,12 +62,6 @@ jobs:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ env.KNOWN_HOSTS }}

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Wait for images to be available
run: |
while true; do
Expand Down Expand Up @@ -121,7 +109,7 @@ jobs:
cd ./${{ github.event.repository.name }}
yarn deploy \
--clear_data=no \
--environment=${{ github.event.inputs.deploy-script-environment }} \
--environment=${{ github.event.inputs.environment }} \
--host=${{ env.DOMAIN }} \
--ssh_host=${{ secrets.SSH_HOST }} \
--ssh_user=${{ secrets.SSH_USER }} \
Expand Down

0 comments on commit dc53b53

Please sign in to comment.