Skip to content

Merge pull request #60 from cevi/dev #27

Merge pull request #60 from cevi/dev

Merge pull request #60 from cevi/dev #27

Workflow file for this run

name: Productive Deployment (Master Branch)
on:
push:
branches:
- master
jobs:
build_docker_container:
runs-on: ubuntu-latest
environment:
name: production
url: https://onlinemat.cevi.tools
steps:
# Checkout the source code
- name: 🛎️ Checkout
uses: actions/checkout@v2
# Restores the cache if it exists.
- name: ⛏ Restore docker image from cache
uses: satackey/[email protected]
continue-on-error: true
- name: 🔐 Login to private Registry (registry.cevi.tools)
uses: docker/login-action@v2
with:
registry: registry.cevi.tools
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Load .evn file from secrets
run: echo "${{ secrets.ENV_FILE }}" > .env
- name: Set gitInfo file
run: |
echo "{\"gitBranch\": \"${GITHUB_REF#refs/heads/}\",\"gitCommitHash\": \"$(git rev-parse --short $GITHUB_SHA)\"}" > src/generatedGitInfo.json
- name: 🏗️ Build the stack
run: docker-compose build
- name: 🚀 Push containers to registry
run: docker-compose push