From f053c0e6bb69f4f4cbb851aed76115d89c94946d Mon Sep 17 00:00:00 2001 From: Arthur Danjou Date: Sat, 19 Dec 2020 17:43:33 +0100 Subject: [PATCH 1/9] Delete node.js.yml --- .github/workflows/node.js.yml | 40 ----------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index a09f980..0000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Node.js CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Deploy to SSH - uses: appleboy/ssh-action@v0.1.4 - with: - host: ${{ secrets.SSH_HOST }} - port: ${{ secrets.SSH_PORT }} - username: ${{ secrets.SSH_USER }} - key: ${{ secrets.SSH_KEY }} - passphrase: ${{ secrets.SSH_PASSPHRASE }} - script: | - cd ${{ secrets.PATH }} - git pull origin master -r artapi artapi-new - cd artapi-new - git fetch --all - git reset --hard origin/master - yarn install --only=master - node ace build --production - cp .env build/.env - - cd .. - mv artapi artapi-old - mv artapi-new artapi - - # Restart server - - cd artapi - pm2 kill - pm2 start build/server.js --name artapi - rm -rf ../artapi-old From 5bfd012b219ee67ddc8676334edce643cfd454ef Mon Sep 17 00:00:00 2001 From: Arthur Danjou Date: Sat, 19 Dec 2020 17:55:12 +0100 Subject: [PATCH 2/9] Create node.js.yml --- .github/workflows/node.js.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..9a5754f --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,35 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + deploy build and run: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node_version }} + - name: Deploy with SSH + uses: appleboy/ssh-action@v0.1.4 + with: + host: ${{ secrets.SSH_HOST }} + port: ${{ secrets.SSH_PORT }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_KEY }} + script: | + git pull + yarn build + pm2 start From 7baf6588a0d385f99a28f8bc469b062e09186c68 Mon Sep 17 00:00:00 2001 From: Arthur Danjou Date: Sat, 19 Dec 2020 17:55:52 +0100 Subject: [PATCH 3/9] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9a5754f..9e5e92e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -10,7 +10,7 @@ on: branches: [ master ] jobs: - deploy build and run: + deploy_build_run: runs-on: ubuntu-latest strategy: matrix: From 00101ea76c8335a849b19fcebf2728c130324fb3 Mon Sep 17 00:00:00 2001 From: Arthur Danjou Date: Sat, 19 Dec 2020 17:56:56 +0100 Subject: [PATCH 4/9] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9e5e92e..8782285 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,6 +30,7 @@ jobs: username: ${{ secrets.SSH_USER }} key: ${{ secrets.SSH_KEY }} script: | + cd ${{ secrets.PATH }} git pull yarn build pm2 start From 9da794cfaddb9146d12c803071ae733912f1056a Mon Sep 17 00:00:00 2001 From: Arthur Danjou Date: Sat, 19 Dec 2020 17:59:07 +0100 Subject: [PATCH 5/9] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8782285..0bbbc5c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -28,6 +28,7 @@ jobs: host: ${{ secrets.SSH_HOST }} port: ${{ secrets.SSH_PORT }} username: ${{ secrets.SSH_USER }} + passphrase: ${{ secrets.SSH_PASSPHRASE }} key: ${{ secrets.SSH_KEY }} script: | cd ${{ secrets.PATH }} From 72bb4ad473f13b103a40f3ab5fc37ee4ee19e83c Mon Sep 17 00:00:00 2001 From: Arthur Danjou Date: Sat, 19 Dec 2020 18:00:55 +0100 Subject: [PATCH 6/9] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0bbbc5c..c288ad9 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [10.x, 12.x, 14.x] + node-version: [14.x] steps: - uses: actions/checkout@v1 From e0c6294fe81b5de3fc8357e3f2ecf6f12fb0a849 Mon Sep 17 00:00:00 2001 From: Arthur Danjou Date: Sat, 19 Dec 2020 18:08:53 +0100 Subject: [PATCH 7/9] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c288ad9..e5d15a7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -33,5 +33,6 @@ jobs: script: | cd ${{ secrets.PATH }} git pull + yarn install yarn build pm2 start From 6564302f3327c31f2c37fec2b5c10c59d03d4282 Mon Sep 17 00:00:00 2001 From: Arthur Danjou Date: Sat, 19 Dec 2020 18:11:11 +0100 Subject: [PATCH 8/9] Update node.js.yml --- .github/workflows/node.js.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e5d15a7..f77e0c2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -29,7 +29,6 @@ jobs: port: ${{ secrets.SSH_PORT }} username: ${{ secrets.SSH_USER }} passphrase: ${{ secrets.SSH_PASSPHRASE }} - key: ${{ secrets.SSH_KEY }} script: | cd ${{ secrets.PATH }} git pull From 93119fcb5d9d963bcfc1b844f78a1e506758b191 Mon Sep 17 00:00:00 2001 From: Arthur Danjou Date: Sat, 19 Dec 2020 18:12:19 +0100 Subject: [PATCH 9/9] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f77e0c2..9a591b6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -28,7 +28,7 @@ jobs: host: ${{ secrets.SSH_HOST }} port: ${{ secrets.SSH_PORT }} username: ${{ secrets.SSH_USER }} - passphrase: ${{ secrets.SSH_PASSPHRASE }} + password: ${{ secrets.SSH_PASSPHRASE }} script: | cd ${{ secrets.PATH }} git pull