Added weekly informations #206
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Linkystat to production | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment to deploy' | |
type: environment | |
default: 'raspberrypi_rsaikali' | |
required: true | |
jobs: | |
deploy-production: | |
runs-on: | |
- self-hosted | |
- ${{ inputs.environment == '' && 'raspberrypi_rsaikali' || inputs.environment }} | |
environment: | |
name: ${{ inputs.environment == '' && 'raspberrypi_rsaikali' || inputs.environment }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Create environment file' | |
run: echo '${{ secrets.ENV_FILE }}' > .env | |
- name: 'Build new Linkystat application' | |
run: docker compose --env-file .env -f compose.yaml -f compose.prod.yaml --profile https build --pull | |
- name: 'Stop previous Linkystat application' | |
run: docker compose --env-file .env -f compose.yaml -f compose.prod.yaml --profile https stop || true | |
- name: 'Start new Linkystat application' | |
run: docker compose --env-file .env -f compose.yaml -f compose.prod.yaml --profile https up -d |