Skip to content

Commit

Permalink
publish after tests, deploy after publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Sep 27, 2023
1 parent f71b1b0 commit 80a52fd
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 14 deletions.
File renamed without changes.
11 changes: 7 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
name: Deployment
name: deployment
on:
workflow_run:
workflows: ["all tests"]
branches: [main]
workflows: ["publish"]
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
deployment:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Deployment
name: Preview Deployment
runs-on: ubuntu-latest
environment: preview
steps:
- name: ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
script: ${{ vars.DEPLOY_SCRIPT }}
16 changes: 14 additions & 2 deletions .github/workflows/docker-dev.yml → .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
name: publish

on: [push, pull_request]
on:
workflow_run:
workflows: ["tests"]
branches:
- main
- activitypub
types:
- completed

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
push_to_docker_hub:
build_and_push_image:
name: build image and push to Docker Hub
if: ${{ github.event.workflow_run.conclusion == 'success' }}
# if: github.repository_owner == 'neodb-social'
runs-on: ubuntu-latest
steps:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "neodb-takahe"]
path = neodb-takahe
url = git@github.com:alphatownsman/neodb-takahe.git
url = https://github.com/alphatownsman/neodb-takahe.git
branch = neodb
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ services:
dev-neodb-web:
<<: *dev-neodb-service
ports:
- "18000:8000"
- "${NEODB_DEV_PORT:-8001}:8000"
command: neodb-manage runserver 0.0.0.0:8000

dev-neodb-worker:
Expand All @@ -235,7 +235,7 @@ services:
dev-takahe-web:
<<: *dev-neodb-service
ports:
- "19000:8000"
- "${TAKAHE_DEV_PORT:-8002}:8000"
command: takahe-manage runserver 0.0.0.0:8000

dev-takahe-stator:
Expand Down
13 changes: 8 additions & 5 deletions neodb.env.example
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# NEODB Configuration

# copy along with docker-compose.yml, rename it to .env
# copy along with docker-compose.yml, rename this file to .env

# Change these before start the instance for the first time!!
NEODB_SECRET_KEY=change_me
NEODB_SITE_NAME=Example Site
NEODB_SITE_DOMAIN=example.site
# Use this for development in Github Codespace
# NEODB_SITE_DOMAIN=${CODESPACE_NAME}-8000.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}

# Change these too
NEODB_SITE_NAME=Example Site
NEODB_SITE_LOGO=/logo.png
NEODB_SITE_ICON=/icon.png
NEODB_SITE_LINKS=@NiceDB=https://donotban.com/@testie,@NeoDB=https://mastodon.social/@neodb

# Turn off DEBUG if you are running as production service
NEODB_DEBUG=False
# Turn off DEBUG only when you are ready for production service
# NEODB_DEBUG=False

# HTTP port your reverse proxy should send request to
# NEODB_PORT=8000
Expand All @@ -30,5 +32,6 @@ NEODB_DEBUG=False
# TAKAHE_STATOR_CONCURRENCY=10
# TAKAHE_STATOR_CONCURRENCY_PER_MODEL=10

# pull NeoDB Docker image from another tag/branch
# pull NeoDB Docker image from a specific tag
# see available tags: https://hub.docker.com/r/neodb/neodb/tags
# NEODB_IMAGE=neodb/neodb:latest

0 comments on commit 80a52fd

Please sign in to comment.