Skip to content

Commit a2ec8fb

Browse files
authored
Update README.md
1 parent f572599 commit a2ec8fb

File tree

1 file changed

+43
-2
lines changed

1 file changed

+43
-2
lines changed

README.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,43 @@
1-
# upload-artifact-to-azure-blob
2-
This action is uploading a build artifact to azure blob and activates the entrypoint at last so that zero downtime is possible
1+
# GitHub Action to upload a build artifact to Azure Blob Storage
2+
This action is uploading a build artifact to azure blob and activates the entrypoint at last so that zero downtime is possible. It is designed
3+
to use the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) to upload a directory
4+
of your choice to your Azure Blob Storage account and upadte the index.html at the last file. This leads to a zero downtime
5+
option.
6+
7+
## Usage
8+
9+
### Example
10+
11+
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)
12+
13+
```yaml
14+
name: Upload SPA To Azure Blob Storage
15+
on:
16+
push:
17+
branches:
18+
- main
19+
jobs:
20+
upload:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: CoreHelpers/upload-artifact-to-azure-blob@main
25+
with:
26+
connectionstring: ${{ secrets.ConnectionString }}
27+
container: publicweb
28+
artifact: artifactname
29+
```
30+
31+
If you want to synchronize local and remote state (for example, if you are publishing a static website), enable the `sync` flag.
32+
33+
### Required Variables
34+
35+
| Key | Value |
36+
|---------------------|----------------------------------------------------------------------------|
37+
| `connectionstring` | The connection string to the storage account |
38+
| `container` | The container name the file should be uploaded to |
39+
| `artifact` | The name of the artifact you want to upload |
40+
41+
## License
42+
43+
This project is distributed under the [MIT license](LICENSE).

0 commit comments

Comments
 (0)