[go: nahoru, domu]

Skip to content

Commit

Permalink
add githuib action pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Nunalves committed Jun 3, 2020
1 parent 6e304ab commit c602fa2
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: npm install and npm run build
run: |
npm i
npm run build-prod
npm run build
- name: Push Build to Releases
uses: ncipollo/release-action@v1
with:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: dev

on:
push:
branches: [ master ]

jobs:
build:
runs-on: [ubuntu-18.04]
strategy:
matrix:
node-version: [12.x]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: npm install and npm run build
run: |
npm i
npm run build-prod
- name: Push Build to Releases
uses: ncipollo/release-action@v1
with:
artifacts: "dist/teamloan-frontend/*"
token: ${{ secrets.TOKEN }}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# env file
/src/environments/environment.prod.ts

# compiled output
/dist
/tmp
Expand Down
28 changes: 28 additions & 0 deletions src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

const backend = { url: 'https://app.teamloan.pt/api/' };
const keycloak = {
url: 'https://auth.teamloan.pt/auth/',
realm: 'TEAMLOAN',
grantType: 'password',
clientId: 'TEAMLOAN_WEB_APP'
};

const googleAnalytics = { userId: 'UA-162361193-1' };
export const environment = {
production: true,
backend,
keycloak,
googleAnalytics
};

/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.

0 comments on commit c602fa2

Please sign in to comment.