diff --git a/.github/workflows/eoefans-spider-azure-deploy.yml b/.github/workflows/eoefans-spider-azure-deploy.yml new file mode 100644 index 0000000..e051779 --- /dev/null +++ b/.github/workflows/eoefans-spider-azure-deploy.yml @@ -0,0 +1,44 @@ +name: Deploy EOEFANS API to Azure + +on: + push: + branches: [ "release" ] + pull_request: + types: [synchronize, closed] + branches: [ "release" ] + +env: + AZURE_WEBAPP_NAME: "eoefans-spider" # set this to your application's name + IMAGE_REGISTRY: "containers.vlink.dev" + IMAGE_REPO: "eoefans" + IMAGE_NAME: "eoefans-spider" + + +jobs: + + Deploy: + permissions: + contents: none + + runs-on: [self-hosted, Linux] + environment: + name: 'Development' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - uses: actions/checkout@v3 + + - name: Log in to VLINK Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ env.IMAGE_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: ${{ env.AZURE_WEBAPP_NAME }} + publish-profile: ${{ secrets.AZURE_CREDENTIALS_EOEFANS_SPIDER }} + images: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:latest