Code Monkey home page Code Monkey logo

azure-storage-action's Introduction

Azure Storage Action

Deploy Files in Azure Blob Storage

With Azure Storage Action, you can automate your workflow to deploy files to Azure Blob Storage

End-to-End Sample Workflows

Dependencies on other Github Actions

  • Checkout Checkout your Git repository content into Github Actions agent.
  • Setup DotNet Sets up a dotnet environment by optionally downloading and caching a version of dotnet by SDK version and adding to PATH .

Create Azure Storage Account and deploy static website using GitHub Actions

  1. Follow the tutorial Azure Storage Account)
  2. Copy the following example of workflow and create the workflow to .github/workflows/ in your project repository.
  3. Change folder to your folder path where files to deploy are.
  4. Commit and push your project to GitHub repository, you should see a new GitHub Action initiated in Actions tab.

Sample workflow to deploy a Static Web Site to Azure Blob Storage

# File: .github/workflows/workflow.yml

on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps: 
    - uses: actions/checkout@v1
    - uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '3.0.100'
    - uses: lauchacarro/Azure-Storage-Action@master
      with:
        enabled-static-website: 'true'
        folder: 'MyFolder'
        index-document: 'index.html'
        error-document: '404.html' # For Angular apps with routing enabled, this must point to the index.html file because the requested routes don't exist phyiscally and blob storage would throw a 404.
        connection-string: ${{ secrets.CONNECTION_STRING }}

Configure connection string:

For any credentials like Azure Service Principal, Publish Profile, Connection Strings, etc add them as secrets in the GitHub repository and then use them in the workflow.

The above example uses the Connection String of your Azure Storage Account.

Follow the steps to configure the secret:

  • Follow the tutorial View and copy a connection string and copy the connection string.
  • Define a new secret under your repository settings, Add secret menu.
  • Paste the connection string file into the secret's value field.
  • Now in the workflow file in your branch: .github/workflows/workflow.yml replace the secret for the input connection-string: of the Azure Storage Action (Refer to the example above).

azure-storage-action's People

Contributors

krumelur avatar lauchacarro avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.