Skip to content

Hosting

Hosting #3633

Workflow file for this run

name: Hosting
on:
push:
paths:
- .github/workflows/hosting.yaml
branches:
- main
schedule:
- cron: '0 */4 * * *'
workflow_run:
workflows: [ 'CI' ]
types: [ completed ]
branches: [ main ]
workflow_dispatch:
env:
HOSTING_PATH: .hosting
jobs:
run-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create .env file
working-directory: ${{ env.HOSTING_PATH }}
run: |
cat <<EOT > .env
Bot__Token=${{ secrets.BOT_TOKEN }}
Bot__AdminIds=${{ secrets.BOT_ADMIN_IDS }}
Serilog__WriteTo__Elasticsearch__Args__nodeUris=${{ secrets.SEMATEXT_ELASTICSEARCH_URIS }}
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
ConnectionStrings__Postgres=${{ secrets.POSTGRES_CONNECTION_STRING }}
AMQP_URI=${{ secrets.AMQP_URI }}
EOT
- name: Nx set SHAs
id: setSHAs
uses: nrwl/[email protected]
with:
workflow-id: ci.yaml
set-environment-variables-for-job: false
- name: Run app
working-directory: ${{ env.HOSTING_PATH }}
run: |
TAG=${{ steps.setSHAs.outputs.base }} docker compose up --pull=always