Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/feeloor/azure-static-website-deploy
Deploys static website to Azure Storage
https://github.com/feeloor/azure-static-website-deploy
actions azure azure-storage ci deployment github-actions static-website
Last synced: 3 months ago
JSON representation
Deploys static website to Azure Storage
- Host: GitHub
- URL: https://github.com/feeloor/azure-static-website-deploy
- Owner: feeloor
- License: mit
- Created: 2019-09-14T19:05:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-04-26T16:02:53.000Z (over 2 years ago)
- Last Synced: 2024-10-09T21:40:50.470Z (4 months ago)
- Topics: actions, azure, azure-storage, ci, deployment, github-actions, static-website
- Language: Shell
- Size: 9.77 KB
- Stars: 17
- Watchers: 2
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-actions - Deploy Static Website to Azure Storage
- fucking-awesome-actions - Deploy Static Website to Azure Storage
- awesome-workflows - Deploy Static Website to Azure Storage
README
# GitHub Action to Upload to Azure Storage
> **⚠️ Note:** To use this action, you must have access to the [GitHub Actions](https://github.com/features/actions) feature.
This action is designed to use the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) to enable static website and upload a directory of your choice to your Azure Storage account.
## Usage
### Example
Place in a `.yml` file such as this one in your `.github/workflows` folder. [Refer to the documentation on workflow YAML syntax here.](https://help.github.com/en/articles/workflow-syntax-for-github-actions)
```yaml
name: Upload To Azure
on: pushjobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: feeloor/azure-static-website-deploy@master
env:
SOURCE_DIR: "./public"
AZURE_CLIENT_ID: ""
AZURE_TENANT_ID: ""
AZURE_SECRET: ""
AZURE_SUBSCRIPTION_ID: ""
AZURE_STORAGE_ACCOUNT_NAME: ""
AZURE_INDEX_DOCUMENT_NAME: ""
AZURE_ERROR_DOCUMENT_NAME: ""
FORCE_OVERWRITE: "true"
```### Required Variables
| Key | Value | Type | Required |
| ------------- | ------------- | ------------- | ------------- |
| `SOURCE_DIR` | The name of the directory you want to upload | `env` | **Yes** |
| `AZURE_CLIENT_ID` | Your Azure Client ID. | `secret` | **Yes** |
| `AZURE_SECRET` | Your Azure Secret. | `secret` | **Yes** |
| `AZURE_TENANT_ID` | Your Azure Tenant ID. | `secret` | **Yes** |
| `AZURE_SUBSCRIPTION_ID` | Your Azure Subscription ID. | `secret` | **Yes** |
| `AZURE_STORAGE_ACCOUNT_NAME` | Your Azure Storage Account Name. | `secret` | **Yes** |
| `AZURE_INDEX_DOCUMENT_NAME` | The index document that you specify when you enable static website hosting, appears when users open the site and don't specify a specific file. [More Information Here](https://docs.microsoft.com/en-US/azure/storage/blobs/storage-blob-static-website#viewing-content) | `env` | **Yes** |
| `AZURE_ERROR_DOCUMENT_NAME` | If the server returns a 404 error, and you have not specified an error document when you enabled the website, then a default 404 page is returned to the user. [More Information Here](https://docs.microsoft.com/en-US/azure/storage/blobs/storage-blob-static-website#viewing-content) | `secret` | **No** |
| `FORCE_OVERWRITE` | If the uploaded file already exists, by default the AZ CLI (since March 2022) will **not** uploads the file. It is possible to force the upload. [More Information Here](https://github.com/Azure/azure-cli/issues/21477) | `env` | **No** |## License
This project is distributed under the [MIT license](LICENSE.md).