Skip to content

Add CEAP do Rio grande do sul, Sergipe e Tocantins #195

Add CEAP do Rio grande do sul, Sergipe e Tocantins

Add CEAP do Rio grande do sul, Sergipe e Tocantins #195

Workflow file for this run

name: .NET Core
on:
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Install .NET dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
dotnet restore ./OPS.API/OPS.API.csproj
dotnet restore ./OPS.Importador/OPS.Importador.csproj
- name: Build .NET
run: |
dotnet build OPS.API --configuration Release --no-restore
dotnet build OPS.Importador --configuration Release --no-restore
- name: Publish .NET
run: |
dotnet publish OPS.API --configuration Release -o ops-api
rm -r ops-api/runtimes
dotnet publish OPS.Importador --configuration Release -o ops-importador
rm -r ops-importador/runtimes
- uses: actions/upload-artifact@v3
with:
name: ops-api
path: ops-api/**
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: ops-importador
path: ops-importador/**
if-no-files-found: error
deploy:
needs: build
runs-on: [self-hosted, king-host]
steps:
- uses: actions/download-artifact@v3
with:
name: ops-api
path: ~/ops-api/
- uses: actions/download-artifact@v3
with:
name: ops-importador
path: ~/ops-importador/
- name: Deploy dos arquivos na pasta final
run: |
/home/vanderlei/ops-importador-deploy.sh
/home/vanderlei/ops-api-deploy.sh