Skip to content

Added deployment-dev workflow #10

Added deployment-dev workflow

Added deployment-dev workflow #10

name: Deploy theme to moodle dev
on:
push:
branches:
- addDeploymentWorkflow
permissions:
id-token: write
contents: read
jobs:
copy_files:
name: Copy files from github to Azure storage
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v3
- name: 'Az CLI login'
uses: azure/login@v1
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- name: Copy files
run: |
# az storage file upload-batch --account-name ${{ vars.AZURE_STORAGE_ACCOUNT }} --destination ${{ vars.AZURE_FILE_SHARE }}/nhse --source . --connection-string '${{ secrets.AZURE_STORAGE_ACCOUNT_CONNECTION_STRING }}'
find . -type f \
-not -path "./.git/*" \
-not -path "./.github/*" \
-not -path "./.vs/*" \
-not -name ".gitattributes" \
-not -name ".gitignore" \
-exec sh -c 'az storage file upload --account-name ${{ vars.AZURE_STORAGE_ACCOUNT }} --share-name ${{ vars.AZURE_FILE_SHARE }} --source {} --path nhse/${1#./}' _ '{}' --account-key ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }} \;