Skip to content

Merge pull request #126 from Freelancers-Union/develop #75

Merge pull request #126 from Freelancers-Union/develop

Merge pull request #126 from Freelancers-Union/develop #75

name: Production FUBot
# Controls when the workflow will run
on:
push:
# Triggers the workflow on push or pull request events but only for the "master" branch
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: self-hosted
# Create env vars for use by the build steps from GitHub secrets
env:
LOGLEVEL: INFO
DISCORDTOKEN: ${{ secrets.DISCORDTOKEN }}
CENSUS_TOKEN: ${{ secrets.CENSUS_TOKEN }}
ENVIRONMENT: "prod"
PORT_MAPPING: 80:443
MONGO_ADDRESS: mongodb
MONGO_DATA_DIR: /var/lib/FUBot/mongodb
MONGO_USERNAME: ${{ secrets.MONGO_USERNAME }}
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
ARMA_DB_HOST: ${{ secrets.ARMA_DB_HOST }}
ARMA_DB_TOKEN: ${{ secrets.ARMA_DB_TOKEN }}
ARMA_HOST: ${{ secrets.ARMA_HOST }}
ARMA_QUERY_PORT: ${{ secrets.ARMA_QUERY_PORT }}
ARMA_SFTP_HOST: ${{ secrets.ARMA_SFTP_HOST }}
ARMA_SFTP_PORT: ${{ secrets.ARMA_SFTP_PORT }}
ARMA_SFTP_USERNAME: ${{ secrets.ARMA_SFTP_USERNAME }}
ARMA_SFTP_PASSWORD: ${{ secrets.ARMA_SFTP_PASSWORD }}
ARMA_SFTP_MAP_PATH: ${{ secrets.ARMA_SFTP_MAP_PATH }}
METABASE_KEY: ${{ secrets.METABASE_KEY }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: build images
run: docker compose build
# update to latest container:
- name: update containers
run: docker compose up -d --force-recreate