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:
@@ -0,0 +1,65 @@
|
||||
name: Deploy to node
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
stack-name:
|
||||
required: false
|
||||
type: string
|
||||
default: dev
|
||||
image-tag:
|
||||
required: false
|
||||
type: string
|
||||
default: latest
|
||||
backend-port:
|
||||
required: false
|
||||
type: string
|
||||
default: 8080
|
||||
website-port:
|
||||
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:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
WEB_ADMIN_USERS: ${{ secrets.DEV_WEB_ADMIN_USERS }}
|
||||
WEB_DISCORD_CLIENT_ID: ${{ secrets.DEV_WEB_DISCORD_CLIENT_ID }}
|
||||
WEB_DISCORD_CLIENT_SECRET: ${{ secrets.DEV_WEB_DISCORD_CLIENT_SECRET }}
|
||||
WEB_EMAIL_SERVER_HOST: ${{ secrets.DEV_WEB_EMAIL_SERVER_HOST }}
|
||||
WEB_EMAIL_SERVER_PASSWORD: ${{ secrets.DEV_WEB_EMAIL_SERVER_PASSWORD }}
|
||||
WEB_EMAIL_SERVER_PORT: ${{ secrets.DEV_WEB_EMAIL_SERVER_PORT }}
|
||||
WEB_EMAIL_SERVER_USER: ${{ secrets.DEV_WEB_EMAIL_SERVER_USER }}
|
||||
WEB_NEXTAUTH_SECRET: ${{ secrets.DEV_WEB_NEXTAUTH_SECRET }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Run playbook
|
||||
uses: dawidd6/action-ansible-playbook@v2
|
||||
with:
|
||||
# Required, playbook filepath
|
||||
playbook: deploy-to-node.yaml
|
||||
# Optional, directory where playbooks live
|
||||
directory: ansible
|
||||
# Optional, SSH private key
|
||||
key: ${{secrets.DEV_NODE_PRIVATE_KEY}}
|
||||
# Optional, literal inventory file contents
|
||||
inventory: |
|
||||
[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}} \
|
||||
postgres_password=${{inputs.postgres-password}} \
|
||||
web_api_key=${{inputs.web-api-key}}"
|
||||
Reference in New Issue
Block a user