diff --git a/.github/workflows/build-docfx.yaml b/.github/workflows/build-docfx.yaml deleted file mode 100644 index 541f94a..0000000 --- a/.github/workflows/build-docfx.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Deploy docs - -on: - push: - branches: - - master - -jobs: - hello_world_job: - runs-on: ubuntu-latest - name: Docs build & deploy - 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. - \ No newline at end of file diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..76217ef --- /dev/null +++ b/.github/workflows/build-test.yml @@ -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 diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..8d34200 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -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. + \ No newline at end of file