From 72999acd1e7ad3cc53722fe5923471e833974fbc Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 13:30:03 -0700 Subject: [PATCH 01/12] Create ruby.yml --- .github/workflows/ruby.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/ruby.yml diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 0000000..1274f60 --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,19 @@ +name: Ruby + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Set up Ruby 2.6 + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + - name: Build and test with Rake + run: | + gem install jekyll -v 3.8.5 + jekyll build From b18b73f001cbc5be24a370a3f642c8c64440988f Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 13:38:10 -0700 Subject: [PATCH 02/12] Add scp action --- .github/workflows/ruby.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 1274f60..f7b4070 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -17,3 +17,13 @@ jobs: run: | gem install jekyll -v 3.8.5 jekyll build + - name: SCP Command to Transfer Files + uses: appleboy/scp-action@v0.0.4 + env: + HOST: ${{ secrets.HOST }} + USERNAME: ${{ secrets.USERNAME }} + PORT: ${{ secrets.PORT }} + KEY: ${{ secrets.KEY }} + with: + source: "_site" + target: "test" From b0b32d541141f14dfb590f548951b8b1ad5ad0a6 Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 14:42:14 -0700 Subject: [PATCH 03/12] Use scp command --- .github/workflows/ruby.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index f7b4070..85d7943 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -9,21 +9,17 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: ruby-version: 2.6.x - - name: Build and test with Rake + + - name: Building website run: | gem install jekyll -v 3.8.5 jekyll build - - name: SCP Command to Transfer Files - uses: appleboy/scp-action@v0.0.4 - env: - HOST: ${{ secrets.HOST }} - USERNAME: ${{ secrets.USERNAME }} - PORT: ${{ secrets.PORT }} - KEY: ${{ secrets.KEY }} - with: - source: "_site" - target: "test" + + - name: Uploading files + run: | + scp -r -P ${{ secrets.PORT }} _site ${{ secrets.USERNAME }}@${{ secrets.HOST }}:test From e8c726a94e7e067b490e0fffb9f6cd3ab8a799e6 Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 14:46:15 -0700 Subject: [PATCH 04/12] =?UTF-8?q?Remove=20host=20verification=20?= =?UTF-8?q?=F0=9F=98=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 85d7943..5e7e980 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -22,4 +22,4 @@ jobs: - name: Uploading files run: | - scp -r -P ${{ secrets.PORT }} _site ${{ secrets.USERNAME }}@${{ secrets.HOST }}:test + scp -o StrictHostKeyChecking=no -r -P ${{ secrets.PORT }} _site ${{ secrets.USERNAME }}@${{ secrets.HOST }}:test From 06c113f2289acf23dbf2a64b29fc30545615ebd2 Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 15:04:16 -0700 Subject: [PATCH 05/12] Update ruby.yml --- .github/workflows/ruby.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 5e7e980..8919d69 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -20,6 +20,12 @@ jobs: gem install jekyll -v 3.8.5 jekyll build - - name: Uploading files - run: | - scp -o StrictHostKeyChecking=no -r -P ${{ secrets.PORT }} _site ${{ secrets.USERNAME }}@${{ secrets.HOST }}:test + - name: Uploading website + uses: appleboy/scp-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + port: ${{ secrets.PORT }} + source: "_site" + target: "test" From 935eb373bf6aac7c2b4d65b75da8d3007ce09044 Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 15:11:13 -0700 Subject: [PATCH 06/12] Refine paths --- .github/workflows/ruby.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 8919d69..b5f9eb5 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -27,5 +27,5 @@ jobs: username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} port: ${{ secrets.PORT }} - source: "_site" - target: "test" + source: "_site/*" + target: "groups/net-lab/www2/" From bc5b14abe92cfd676a413cfe7b1eb0f39cccd9df Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 15:23:31 -0700 Subject: [PATCH 07/12] Change method for uploading data --- .github/workflows/ruby.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index b5f9eb5..a790a66 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -21,11 +21,6 @@ jobs: jekyll build - name: Uploading website - uses: appleboy/scp-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - port: ${{ secrets.PORT }} - source: "_site/*" - target: "groups/net-lab/www2/" + run: | + apt install sshpass + sshpass -p "${{ secrets.PASSWORD }}" scp -P ${{ secrets.PORT }} -r _site/* ${{ secrets.USERNAME }}@${{ secrets.HOST }}:groups/net-lab/www2/ From eee6f5fc93f309d84eacc19931b6946f770decdb Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 15:26:32 -0700 Subject: [PATCH 08/12] Testing --- .github/workflows/ruby.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index a790a66..bd404a4 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -15,12 +15,12 @@ jobs: with: ruby-version: 2.6.x - - name: Building website - run: | - gem install jekyll -v 3.8.5 - jekyll build +# - name: Building website +# run: | +# gem install jekyll -v 3.8.5 +# jekyll build - name: Uploading website run: | - apt install sshpass + apt-get install sshpass sshpass -p "${{ secrets.PASSWORD }}" scp -P ${{ secrets.PORT }} -r _site/* ${{ secrets.USERNAME }}@${{ secrets.HOST }}:groups/net-lab/www2/ From b53d160ff8e930a800e0873ecfb904fffc410231 Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 15:27:33 -0700 Subject: [PATCH 09/12] Update ruby.yml --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index bd404a4..aa337bc 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -22,5 +22,5 @@ jobs: - name: Uploading website run: | - apt-get install sshpass + sudo apt-get install sshpass sshpass -p "${{ secrets.PASSWORD }}" scp -P ${{ secrets.PORT }} -r _site/* ${{ secrets.USERNAME }}@${{ secrets.HOST }}:groups/net-lab/www2/ From 308ffd804bf768061c7b1a9f00333a33cfd312a7 Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 15:28:39 -0700 Subject: [PATCH 10/12] Update ruby.yml --- .github/workflows/ruby.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index aa337bc..d8b90e3 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -15,12 +15,11 @@ jobs: with: ruby-version: 2.6.x -# - name: Building website -# run: | -# gem install jekyll -v 3.8.5 -# jekyll build + - name: Building website + run: | + gem install jekyll -v 3.8.5 + jekyll build - name: Uploading website run: | - sudo apt-get install sshpass sshpass -p "${{ secrets.PASSWORD }}" scp -P ${{ secrets.PORT }} -r _site/* ${{ secrets.USERNAME }}@${{ secrets.HOST }}:groups/net-lab/www2/ From a27c90674ea7014912d649480ae77fb4e3530559 Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 15:35:34 -0700 Subject: [PATCH 11/12] Update ruby.yml --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index d8b90e3..d5c8f62 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -22,4 +22,4 @@ jobs: - name: Uploading website run: | - sshpass -p "${{ secrets.PASSWORD }}" scp -P ${{ secrets.PORT }} -r _site/* ${{ secrets.USERNAME }}@${{ secrets.HOST }}:groups/net-lab/www2/ + sshpass -p "${{ secrets.PASSWORD }}" scp -o StrictHostKeyChecking=no -P ${{ secrets.PORT }} -r _site/* ${{ secrets.USERNAME }}@${{ secrets.HOST }}:groups/net-lab/www2/ From 54686196cab82d0399cd134afc3b0400cf4017d4 Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 20 Nov 2019 15:45:11 -0700 Subject: [PATCH 12/12] Change folder --- .github/workflows/ruby.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index d5c8f62..b00f833 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v1 - + - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: @@ -19,7 +19,7 @@ jobs: run: | gem install jekyll -v 3.8.5 jekyll build - + - name: Uploading website run: | - sshpass -p "${{ secrets.PASSWORD }}" scp -o StrictHostKeyChecking=no -P ${{ secrets.PORT }} -r _site/* ${{ secrets.USERNAME }}@${{ secrets.HOST }}:groups/net-lab/www2/ + sshpass -p "${{ secrets.PASSWORD }}" scp -o StrictHostKeyChecking=no -P ${{ secrets.PORT }} -r _site/* ${{ secrets.USERNAME }}@${{ secrets.HOST }}:groups/net-lab/www/