mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-27 16:10:30 +08:00
prepared playbook for prod
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Deploy to dev machine
|
||||
name: Deploy to node
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
@@ -19,6 +19,14 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: 3000
|
||||
postgres-password:
|
||||
required: false
|
||||
type: string
|
||||
default: postgres
|
||||
web-api-key:
|
||||
required: false
|
||||
type: string
|
||||
default: "1234"
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@@ -39,7 +47,7 @@ jobs:
|
||||
uses: dawidd6/action-ansible-playbook@v2
|
||||
with:
|
||||
# Required, playbook filepath
|
||||
playbook: deploy-dev.yaml
|
||||
playbook: deploy-to-node.yaml
|
||||
# Optional, directory where playbooks live
|
||||
directory: ansible
|
||||
# Optional, SSH private key
|
||||
@@ -49,4 +57,9 @@ jobs:
|
||||
[dev]
|
||||
dev01 ansible_host=${{secrets.DEV_NODE_IP}} ansible_connection=ssh ansible_user=web-team
|
||||
options: |
|
||||
--extra-vars "stack_name=${{inputs.stack-name}} image_tag=${{inputs.image-tag}} backend_port=${{inputs.backend-port}} website_port=${{inputs.website-port}}"
|
||||
--extra-vars "stack_name=${{inputs.stack-name}} \
|
||||
image_tag=${{inputs.image-tag}} \
|
||||
backend_port=${{inputs.backend-port}} \
|
||||
website_port=${{inputs.website-port}} \
|
||||
postgres_password=${{inputs.postgres-password}} \
|
||||
web_api_key=${{inputs.web-api-key}}"
|
||||
@@ -35,9 +35,9 @@ jobs:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.discord-bot
|
||||
build-args: ""
|
||||
deploy-dev:
|
||||
deploy-to-node:
|
||||
needs: [build-backend, build-web, build-bot]
|
||||
uses: ./.github/workflows/deploy-dev.yaml
|
||||
uses: ./.github/workflows/deploy-to-node.yaml
|
||||
secrets: inherit
|
||||
with:
|
||||
stack-name: ${{ github.event_name == 'release' && 'staging' || 'dev' }}
|
||||
@@ -46,3 +46,9 @@ jobs:
|
||||
'latest' }}
|
||||
backend-port: ${{ github.event_name == 'release' && '8180' || '8080' }}
|
||||
website-port: ${{ github.event_name == 'release' && '3100' || '3000' }}
|
||||
postgres-password:
|
||||
${{ github.event_name == 'release' && secrets.STAGING_POSTGRES_PASSWORD
|
||||
|| 'postgres' }}
|
||||
web-api-key:
|
||||
${{ github.event_name == 'release' && secrets.STAGING_WEB_API_KEY ||
|
||||
'1234' }}
|
||||
|
||||
Reference in New Issue
Block a user