Merge pull request #5 from alanta/fix/updated-content-zip #19
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: .NET Core | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --configuration Release --no-build --verbosity normal | |
- name: Publish | |
run: dotnet publish --configuration Release --no-build -o ./tools | |
- name: "Artifact : generator" | |
uses: actions/upload-artifact@v2 | |
with: | |
name: "Generator" | |
path: ./tools | |
- name: Publish | |
run: dotnet run --configuration Release -- -l Debug | |
env: | |
LinkRoot: ${{ secrets.LINKROOT }} # Fix subfolder links https://statiq.dev/framework/configuration/settings | |
Host: ${{ secrets.HOST }} # Make links absolute (for feeds, OG...) | |
- name: "Artifact : site" | |
uses: actions/upload-artifact@v2 | |
with: | |
name: "Site" | |
path: ./output | |
- name: Deploy 🚀 | |
if: github.ref == 'refs/heads/main' | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: output | |
CLEAN: true # Automatically remove deleted files from the deploy branch |