From 892dbfd36d8b1a2352b431cffdb26adec8f97b6e Mon Sep 17 00:00:00 2001 From: Francesco Sciuti Date: Mon, 25 May 2020 16:49:57 +0200 Subject: [PATCH 01/11] Create main.yml --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..4f5506f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Use Node.js 10 + with: + node-version: '10.x' + - name: Build and Deploy + uses: JamesIves/github-pages-deploy-action@releases/v2 + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + BASE_BRANCH: master + BRANCH: gh-pages + FOLDER: dist + BUILD_SCRIPT: npm install && npm run build --prod From b62d0491ce5d9961d38f40fe2c115453be4138d0 Mon Sep 17 00:00:00 2001 From: Francesco Sciuti Date: Mon, 25 May 2020 16:51:26 +0200 Subject: [PATCH 02/11] Update main.yml --- .github/workflows/main.yml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4f5506f..fa09790 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,35 +1,31 @@ -# This is a basic workflow to help you get started with Actions +name: Deploy to GitHub Pages -name: CI - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch on: - push: - branches: [ master ] + push: + branches: + - master -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" build: - # The type of runner that the job will run on runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. with: persist-credentials: false - - name: Use Node.js 10 + - name: Use Node.js 10.x + uses: actions/setup-node@v1 with: node-version: '10.x' - - name: Build and Deploy + - name: Build + run: | + npm install -g @angular/cli + npm install + ng build --prod --base-href="/farming-game-calc/" + - name: Deploy uses: JamesIves/github-pages-deploy-action@releases/v2 env: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} BASE_BRANCH: master BRANCH: gh-pages - FOLDER: dist - BUILD_SCRIPT: npm install && npm run build --prod + FOLDER: dist/FarmingGameNetAssetCalculator From 470c50d3ab657815faa5a117ac7a971f28deb29c Mon Sep 17 00:00:00 2001 From: Francesco Sciuti Date: Mon, 25 May 2020 16:56:20 +0200 Subject: [PATCH 03/11] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa09790..269f216 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,4 +28,4 @@ jobs: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} BASE_BRANCH: master BRANCH: gh-pages - FOLDER: dist/FarmingGameNetAssetCalculator + FOLDER: dist From 36b22f575737c4a2edf25f3e4833f679ace9f31d Mon Sep 17 00:00:00 2001 From: Francesco Sciuti Date: Mon, 25 May 2020 17:31:15 +0200 Subject: [PATCH 04/11] Create ng-env-replace.js --- .github/workflows/ng-env-replace.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/ng-env-replace.js diff --git a/.github/workflows/ng-env-replace.js b/.github/workflows/ng-env-replace.js new file mode 100644 index 0000000..f7f40db --- /dev/null +++ b/.github/workflows/ng-env-replace.js @@ -0,0 +1,10 @@ +const fs = require('fs'); + +const targetPath = './src/environments/environment.prod.ts'; + +const file = fs.readFileSync(targetPath ,'utf8'); +console.log(file); + +const newFile = file.replace('REDIS_SERVER_API_WS', '${process.env.REDIS_SERVER_API_WS}'); + +fs.writeFileSync(targetPath , newFile); From 27e6067b94761c557eccce290ff764d8c271b443 Mon Sep 17 00:00:00 2001 From: Francesco Sciuti Date: Mon, 25 May 2020 17:34:52 +0200 Subject: [PATCH 05/11] Update main.yml --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 269f216..2d52887 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,10 @@ jobs: run: | npm install -g @angular/cli npm install + node ./.github/workflows/ng-env-replace.js ng build --prod --base-href="/farming-game-calc/" + env: + REDIS_SERVER_API_WS: ${{ secrets.REDIS_SERVER_API_WS }} - name: Deploy uses: JamesIves/github-pages-deploy-action@releases/v2 env: From ec52a8f83601928a55f2c43f27992fae5997a5d5 Mon Sep 17 00:00:00 2001 From: Francesco Sciuti Date: Mon, 25 May 2020 17:38:09 +0200 Subject: [PATCH 06/11] Update ng-env-replace.js --- .github/workflows/ng-env-replace.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ng-env-replace.js b/.github/workflows/ng-env-replace.js index f7f40db..3de8ca6 100644 --- a/.github/workflows/ng-env-replace.js +++ b/.github/workflows/ng-env-replace.js @@ -1,10 +1,7 @@ const fs = require('fs'); const targetPath = './src/environments/environment.prod.ts'; - const file = fs.readFileSync(targetPath ,'utf8'); -console.log(file); - const newFile = file.replace('REDIS_SERVER_API_WS', '${process.env.REDIS_SERVER_API_WS}'); fs.writeFileSync(targetPath , newFile); From 10458fe1e96dfa614db26428ee6a7658a089890f Mon Sep 17 00:00:00 2001 From: Francesco Sciuti Date: Mon, 25 May 2020 17:43:12 +0200 Subject: [PATCH 07/11] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d52887..a7104ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: npm install -g @angular/cli npm install node ./.github/workflows/ng-env-replace.js - ng build --prod --base-href="/farming-game-calc/" + ng build --prod --base-href="/redis-patterns-console/" env: REDIS_SERVER_API_WS: ${{ secrets.REDIS_SERVER_API_WS }} - name: Deploy From 1d663e87c7057b9ea6a49be579868a27bce4cd16 Mon Sep 17 00:00:00 2001 From: Francesco Sciuti Date: Mon, 25 May 2020 17:50:07 +0200 Subject: [PATCH 08/11] Update ng-env-replace.js --- .github/workflows/ng-env-replace.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ng-env-replace.js b/.github/workflows/ng-env-replace.js index 3de8ca6..075a369 100644 --- a/.github/workflows/ng-env-replace.js +++ b/.github/workflows/ng-env-replace.js @@ -2,6 +2,11 @@ const fs = require('fs'); const targetPath = './src/environments/environment.prod.ts'; const file = fs.readFileSync(targetPath ,'utf8'); + +console.log(file); + const newFile = file.replace('REDIS_SERVER_API_WS', '${process.env.REDIS_SERVER_API_WS}'); +console.log(newFile); + fs.writeFileSync(targetPath , newFile); From fe3f4901b5b84c92d7c6365cfe5040516484ddec Mon Sep 17 00:00:00 2001 From: Francesco Sciuti Date: Mon, 25 May 2020 17:57:54 +0200 Subject: [PATCH 09/11] Update ng-env-replace.js --- .github/workflows/ng-env-replace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ng-env-replace.js b/.github/workflows/ng-env-replace.js index 075a369..8c2e9ba 100644 --- a/.github/workflows/ng-env-replace.js +++ b/.github/workflows/ng-env-replace.js @@ -5,7 +5,7 @@ const file = fs.readFileSync(targetPath ,'utf8'); console.log(file); -const newFile = file.replace('REDIS_SERVER_API_WS', '${process.env.REDIS_SERVER_API_WS}'); +const newFile = file.replace('REDIS_SERVER_API_WS', process.env.REDIS_SERVER_API_WS); console.log(newFile); From 025e9cd5fe4e903008ca7fbd0a884324ccc0c851 Mon Sep 17 00:00:00 2001 From: Francesco Sciuti Date: Mon, 25 May 2020 18:02:49 +0200 Subject: [PATCH 10/11] Update ng-env-replace.js --- .github/workflows/ng-env-replace.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ng-env-replace.js b/.github/workflows/ng-env-replace.js index 8c2e9ba..b706a80 100644 --- a/.github/workflows/ng-env-replace.js +++ b/.github/workflows/ng-env-replace.js @@ -2,11 +2,6 @@ const fs = require('fs'); const targetPath = './src/environments/environment.prod.ts'; const file = fs.readFileSync(targetPath ,'utf8'); - -console.log(file); - const newFile = file.replace('REDIS_SERVER_API_WS', process.env.REDIS_SERVER_API_WS); -console.log(newFile); - fs.writeFileSync(targetPath , newFile); From b90c14f4cc24d1dba89930014b283fc1f7bd92a6 Mon Sep 17 00:00:00 2001 From: Erika Bernardini <81314810+erikabe02@users.noreply.github.com> Date: Fri, 8 Oct 2021 15:02:31 +0200 Subject: [PATCH 11/11] file di prova per il push --- src/prova.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/prova.txt diff --git a/src/prova.txt b/src/prova.txt new file mode 100644 index 0000000..f17ce5e --- /dev/null +++ b/src/prova.txt @@ -0,0 +1 @@ +file di prova \ No newline at end of file