Skip to content

Commit

Permalink
Merge branch 'feature/CI-deploy-action' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRynne committed Jun 13, 2020
2 parents 4c27ff3 + 2d3ac83 commit 926aa94
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 26 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/build-docfx.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: .NET Core

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: 🛎 Checkout repo
uses: actions/checkout@v2
- name: 🚧 Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: ⚙️ Install dependencies
run: dotnet restore
- name: 🏗 Build
run: dotnet build --configuration Release --no-restore
- name: 🧪 Test
run: dotnet test --no-restore --verbosity normal
50 changes: 50 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy docs

on:
push:
tags:
- v*

jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: 🛎 Checkout repo
uses: actions/checkout@v2
- name: 🚧 Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
source-url: https://nuget.pkg.github.com/Paramdigma/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: ⚙️ Install dependencies
run: dotnet restore
- name: 🏗 Build
run: dotnet build --configuration Release --no-restore
- name: 🧪 Test
run: dotnet test --no-restore --verbosity normal
- name: 📦 Create the package
run: dotnet pack --configuration Release src/Paramdigma.Core.csproj
- name: 🚀 Publish the package to GPR
run: dotnet nuget push src/bin/Release/*.nupkg

deploy_docs:
runs-on: ubuntu-latest
name: Docs build & deploy
needs: build_and_publish
steps:
- uses: actions/checkout@v2
name: 🛎 Checkout
- run: "rm .gitignore && ls ."
name: 🗑 Remove .gitignore file
- uses: nikeee/docfx-action@master
name: 📚 Build Docs
with:
args: docfx_project/docfx.json
- name: 🚀 Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/ # The folder the action should deploy.

0 comments on commit 926aa94

Please sign in to comment.