Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #13

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #13

name: .NET Core
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.102
- name: Install fornax
run: dotnet tool restore
- name: Build with fornax
run: dotnet tool run fornax build
- name: Upload generated website
uses: actions/upload-artifact@v2
with:
name: public
path: _public # or path/to/artifact
publish:
needs: build # ensure it runs only after build completes.
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Download generated website
uses: actions/[email protected]
with:
name: public
path: _public
- name: Azure Blob Storage Upload
uses: bacongobbler/[email protected]
with:
# The connection string for the storage account
connection_string: ${{ secrets.AZURE_STORAGE_CONN_STR }}
# The name of the storage account container these assets will be uploaded to
container_name: $web
# The name of the directory you want to upload
source_dir: ${{ github.workspace }}/_public
# Extra arguments that can be passed to `az storage blob upload-batch|sync`. Useful for passing flags like `--pattern` or `--destination-path`
extra_args: "" # optional
# Use `az storage blob sync` to synchronize blobs recursively
sync: true
publish_pr:
needs: build # ensure it runs only after build completes.
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps:
- name: Download generated website
uses: actions/[email protected]
with:
name: public
path: _public
- name: Azure Blob Storage Upload
uses: bacongobbler/[email protected]
with:
# The connection string for the storage account
connection_string: ${{ secrets.AZURE_STORAGE_CONN_STR }}
# The name of the storage account container these assets will be uploaded to
container_name: $web
# The name of the directory you want to upload
source_dir: ${{ github.workspace }}/_public
# Extra arguments that can be passed to `az storage blob upload-batch|sync`. Useful for passing flags like `--pattern` or `--destination-path`
extra_args: --destination-path ${GITHUB_REF##*/} # optional
# Use `az storage blob sync` to synchronize blobs recursively
sync: true