Azure Storage Action
v1.0
باستخدام Azure Storage Action ، يمكنك أتمتة سير العمل الخاص بك لنشر الملفات إلى Azure Blob Storage
.github/workflows/ في مستودع المشروع الخاص بك.folder إلى مسار المجلد الخاص بك حيث توجد الملفات المراد نشرها. # 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 }}
بالنسبة لأي بيانات اعتماد مثل Azure Service Principal، ونشر الملف الشخصي، وسلاسل الاتصال، وما إلى ذلك، قم بإضافتها كأسرار في مستودع GitHub ثم استخدمها في سير العمل.
يستخدم المثال أعلاه سلسلة الاتصال الخاصة بحساب تخزين Azure الخاص بك.
اتبع الخطوات لتكوين السر:
.github/workflows/workflow.yml استبدل سر connection-string: الخاصة بإجراء تخزين Azure (راجع المثال أعلاه).