Skip to content

Commit e33dd24

Browse files
authored
Merge pull request #3 from MrGuato/staging
Pull from Staging
2 parents c1b24cd + 28bbf6f commit e33dd24

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

sync-resume.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Sync Resume to Azure Storage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'frontend/**'
9+
10+
jobs:
11+
sync-to-azure:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Login to Azure
19+
uses: azure/login@v1
20+
with:
21+
creds: ${{ secrets.AZURE_CREDENTIALS }}
22+
23+
- name: Debug Directory
24+
run: ls -l frontend # Verify frontend folder exists before uploading
25+
26+
- name: Create container if not exists
27+
shell: bash
28+
run: |
29+
az storage container create \
30+
--name "${{ secrets.CONTAINER_NAME }}" \
31+
--account-name "${{ secrets.STORAGE_ACCOUNT_NAME }}" \
32+
--auth-mode login \
33+
--public-access off
34+
35+
- name: Upload to Blob Storage
36+
shell: bash
37+
run: |
38+
az storage blob upload-batch \
39+
--account-name "${{ secrets.STORAGE_ACCOUNT_NAME }}" \
40+
--auth-mode login \
41+
--source "frontend" \
42+
--destination "${{ secrets.CONTAINER_NAME }}"
43+
44+
- name: Purge Front Door Endpoint
45+
shell: bash
46+
run: |
47+
az afd endpoint purge \
48+
--resource-group "${{ secrets.RESOURCE_GROUP }}" \
49+
--profile-name "${{ secrets.FRONTDOOR_NAME }}" \
50+
--endpoint-name "${{ secrets.FRONTDOOR_ENDPOINT }}" \
51+
--content-paths "/*" \
52+
--no-wait

0 commit comments

Comments
 (0)