-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (45 loc) · 1.17 KB
/
deploy-blob.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: "hugo-release"
on: # rebuild master branch changes
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.83.1'
extended: true
- name: Build
run: hugo
- name: Upload hugo output
uses: actions/upload-artifact@v4
with:
name: hugo
path: './public'
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: kheiakiyama/install-azcopy-action@v1
with:
version: 'v10'
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Download hugo output
uses: actions/download-artifact@v4
with:
name: hugo
path: ./hugo
- name: azcopy upload hugo content
run: |
azcopy_v10 --version | grep 'azcopy'
azcopy_v10 sync ./hugo "$BLOB_CONTAINER_URL" --recursive=true --delete-destination=true
env:
BLOB_CONTAINER_URL: 'https://kheiakiyama.blob.core.windows.net/$web'
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}