.
This commit is contained in:
63
.github/workflows/build.yml
vendored
63
.github/workflows/build.yml
vendored
@@ -6,31 +6,32 @@ on:
|
|||||||
branches: [ ci-cd ]
|
branches: [ ci-cd ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
build-frontend:
|
#build-frontend:
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v4
|
# - uses: actions/checkout@v4
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
# - name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@master
|
# uses: actions/setup-node@master
|
||||||
with:
|
# with:
|
||||||
node-version: 20
|
# node-version: 20
|
||||||
- name: Install Angular CLI
|
# - name: Install Angular CLI
|
||||||
run: yarn global add @angular/cli
|
# run: yarn global add @angular/cli
|
||||||
- name: Configure ng to use yarn
|
# - name: Configure ng to use yarn
|
||||||
run: ng config --global cli.packageManager yarn
|
# run: ng config --global cli.packageManager yarn
|
||||||
- name: Yarn install
|
# - name: Yarn install
|
||||||
working-directory: Frontend
|
# working-directory: Frontend
|
||||||
run: yarn install
|
# run: yarn install
|
||||||
- name: Build Angular
|
# - name: Build Angular
|
||||||
working-directory: Frontend
|
# working-directory: Frontend
|
||||||
run: ng build --configuration=production
|
# run: ng build --configuration=production
|
||||||
- name: Upload artifact
|
# - name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
# uses: actions/upload-artifact@v4
|
||||||
with:
|
# with:
|
||||||
name: frontend
|
# name: frontend
|
||||||
path: Frontend/dist
|
# path: Frontend/dist
|
||||||
build-backend:
|
build-backend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment: morska
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup dotnet 6
|
- name: Setup dotnet 6
|
||||||
@@ -45,10 +46,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
dotnet build --configuration Release --no-restore
|
dotnet build --configuration Release --no-restore
|
||||||
dotnet publish --configuration Release --framework net8.0 --runtime linux-x64 --self-contained false --output ../build_webapi
|
dotnet publish --configuration Release --framework net8.0 --runtime linux-x64 --self-contained false --output ../build_webapi
|
||||||
- name: Upload artifact
|
- name: Compress files
|
||||||
uses: actions/upload-artifact@v4
|
run: |
|
||||||
|
tar -czvf DiunaBI-webAPI.tar.gz -C ./
|
||||||
|
#- name: Copy artifacts into server
|
||||||
|
- name: Upload
|
||||||
|
uses: appleboy/scp-action@v0.1.7
|
||||||
with:
|
with:
|
||||||
name: webapi
|
host: "crm.bim-it.pl"
|
||||||
path: build_webapi
|
username: "mz"
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
port: 22
|
||||||
|
source: "*"
|
||||||
|
target: "/home/mz/github"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user