Skip to content

Added tags and reading time #29

Added tags and reading time

Added tags and reading time #29

Workflow file for this run

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: CD
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to registry
uses: docker/login-action@v1
with:
registry: https://index.docker.io/v1/
username: ${{ secrets.AzureAppService_ContainerUsername_798998f839ab43a99357c160246d9eb5 }}
password: ${{ secrets.AzureAppService_ContainerPassword_6c85c5a5c0b0417587ecd482acdb6265 }}
- name: Build and push container image to registry
uses: docker/build-push-action@v2
with:
push: true
tags: index.docker.io/${{ secrets.AzureAppService_ContainerUsername_798998f839ab43a99357c160246d9eb5 }}/alon.kr:${{ github.sha }}
file: ./Dockerfile
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'production'
url: 'https://alon.kr/'
steps:
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'alonkr'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_6647682407e240d291167d681c298a6d }}
images: 'index.docker.io/${{ secrets.AzureAppService_ContainerUsername_798998f839ab43a99357c160246d9eb5 }}/alon.kr:${{ github.sha }}'
ping:
runs-on: ubuntu-latest
needs: deploy
steps:
- run: sleep 10m
- name: ping
run: curl http://www.google.com/ping?sitemap=https://alon.kr/sitemap.xml