Skip to content

Merge pull request #158 from Prodeko/main #28

Merge pull request #158 from Prodeko/main

Merge pull request #158 from Prodeko/main #28

Workflow file for this run

name: Build and deploy
on:
push:
branches:
- production
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: 'Production'
url: 'http://bilis2.prodeko.org'
steps:
- uses: actions/checkout@v2
- name: Login via Azure CLI
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Docker login to ACR
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
run: |
docker build -f Dockerfile.prod . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/bilis/bilis
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/bilis/bilis
- name: Deploy from ACR
uses: azure/webapps-deploy@v2
with:
app-name: 'bilis2'
images: ${{ secrets.REGISTRY_LOGIN_SERVER }}/bilis/bilis
- name: Azure logout
run: |
az logout