From 55715ae3960cfb3d7154af1030445a58f5245e29 Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 12:30:29 -0700 Subject: [PATCH 01/15] deploy each branch to gh actions --- .github/workflows/build.yml | 17 ++++++++++++----- .github/workflows/test.yml | 16 ---------------- 2 files changed, 12 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94dc3e048..b231abab0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,11 +9,18 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Install NPM dependencies - run: npm install + run: npm ci - name: Build run: npm run build - - name: Upload build artifact - uses: actions/upload-artifact@v2 + - name: Test + run: npm test + - name: Lint + run: npm run lint + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 with: - name: stremio-web - path: build + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + destination_dir: ${{ github.head_ref }} + enable_jekyll: true + allow_empty_commit: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index a3ebba0ff..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Test - -on: push - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install NPM dependencies - run: npm install - - name: Test - run: npm test - - name: Lint - run: npm run lint From fcb4afc170afab26fca1867a0d8b2c082e05eb87 Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:00:03 -0700 Subject: [PATCH 02/15] push on branches --- .github/workflows/build.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b231abab0..d60df4c67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,9 @@ name: Build -on: push +on: + push: + branches: + - '*' jobs: build: @@ -15,12 +18,15 @@ jobs: - name: Test run: npm test - name: Lint - run: npm run lint + run: npm run lint && echo ${{ github.ref_name }} + pages: + runs-on: ubuntu-latest + steps: - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - destination_dir: ${{ github.head_ref }} + destination_dir: ${{ github.ref_name }} enable_jekyll: true allow_empty_commit: true From 14ede9df418441e6adb0348c0d489bfcbf690c0c Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:01:28 -0700 Subject: [PATCH 03/15] job dependency --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d60df4c67..7555224fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: - name: Lint run: npm run lint && echo ${{ github.ref_name }} pages: + needs: build runs-on: ubuntu-latest steps: - name: Deploy to GitHub Pages From 52ddcaf71f007945e922bec299e0d7f26f526962 Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:02:45 -0700 Subject: [PATCH 04/15] remove echo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7555224fa..57495da07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: - name: Test run: npm test - name: Lint - run: npm run lint && echo ${{ github.ref_name }} + run: npm run lint pages: needs: build runs-on: ubuntu-latest From 7e0edb84a60c4dbf2c811c9d604107108ff29e2a Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:07:55 -0700 Subject: [PATCH 05/15] keep_files --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57495da07..ba34d6bd5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,5 +29,5 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build destination_dir: ${{ github.ref_name }} - enable_jekyll: true + keep_files: true allow_empty_commit: true From af64c2bbd844f482ede3194ae8d09507d6c11aef Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:12:20 -0700 Subject: [PATCH 06/15] revert job split --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba34d6bd5..4497d6559 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,10 +19,6 @@ jobs: run: npm test - name: Lint run: npm run lint - pages: - needs: build - runs-on: ubuntu-latest - steps: - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: From 1eedb8477fc9fa5968445b45f3cc8bf253629cfd Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:21:46 -0700 Subject: [PATCH 07/15] destination_dir check --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4497d6559..16f119d5e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,6 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - destination_dir: ${{ github.ref_name }} + destination_dir: `[[ "${{ github.ref_name }}" != "pages-ci" ]] && echo ${{ github.ref_name }}` keep_files: true allow_empty_commit: true From 46bf7852a25e630cc1ce61863851b80c8d2c6611 Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:23:14 -0700 Subject: [PATCH 08/15] DESTINATION_DIR env --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16f119d5e..1755424d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,9 +21,11 @@ jobs: run: npm run lint - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 + env: + DESTINATION_DIR: `[[ "${{ github.ref_name }}" != "pages-ci" ]] && echo ${{ github.ref_name }}` with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - destination_dir: `[[ "${{ github.ref_name }}" != "pages-ci" ]] && echo ${{ github.ref_name }}` + destination_dir: $DESTINATION_DIR keep_files: true allow_empty_commit: true From c72218f96913b698e196884da787aa07531cfee1 Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:33:22 -0700 Subject: [PATCH 09/15] destination_dir check --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1755424d3..ef66b06ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,11 +21,9 @@ jobs: run: npm run lint - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 - env: - DESTINATION_DIR: `[[ "${{ github.ref_name }}" != "pages-ci" ]] && echo ${{ github.ref_name }}` with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - destination_dir: $DESTINATION_DIR + destination_dir: ${{ github.ref_name != 'development' && github.ref_name || "") }} keep_files: true allow_empty_commit: true From 93028071619f6c65771b35f90ecd3aff5225b17e Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:35:06 -0700 Subject: [PATCH 10/15] use single quotes --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef66b06ae..cff001f66 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,6 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - destination_dir: ${{ github.ref_name != 'development' && github.ref_name || "") }} + destination_dir: ${{ github.ref_name != 'development' && github.ref_name || '') }} keep_files: true allow_empty_commit: true From 9651acd37bf3573b6f8dca9151f65b2ea8d9135e Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:36:12 -0700 Subject: [PATCH 11/15] fix yaml syntax --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cff001f66..3151839d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,6 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - destination_dir: ${{ github.ref_name != 'development' && github.ref_name || '') }} + destination_dir: ${{ github.ref_name != 'development' && github.ref_name || '' }} keep_files: true allow_empty_commit: true From c8a0b5d1ee09722e420fa842a5c25e2874a156b9 Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:38:05 -0700 Subject: [PATCH 12/15] test with pages-ci --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3151839d7..fc80dc7b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,6 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - destination_dir: ${{ github.ref_name != 'development' && github.ref_name || '' }} + destination_dir: ${{ github.ref_name != 'pages-ci' && github.ref_name || '' }} keep_files: true allow_empty_commit: true From 713b46b0d4eda843fc8327090a9eed050cc3414e Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:41:11 -0700 Subject: [PATCH 13/15] revert development branch check --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc80dc7b9..3151839d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,6 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - destination_dir: ${{ github.ref_name != 'pages-ci' && github.ref_name || '' }} + destination_dir: ${{ github.ref_name != 'development' && github.ref_name || '' }} keep_files: true allow_empty_commit: true From f2390a99195e01a1ed4f119877c8ec006075472b Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:48:36 -0700 Subject: [PATCH 14/15] remove keep_files flag --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3151839d7..59bcd5ee2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,5 +25,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build destination_dir: ${{ github.ref_name != 'development' && github.ref_name || '' }} - keep_files: true allow_empty_commit: true From 64f7a60ce53e040982f3e47eae4cbea2f5483ec4 Mon Sep 17 00:00:00 2001 From: unclekingpin Date: Thu, 18 May 2023 13:55:21 -0700 Subject: [PATCH 15/15] Empty commit