Merge pull request #14 from kheiakiyama/azcopy #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |