From e79f9f7e5395eacd2e06096122384b310512db45 Mon Sep 17 00:00:00 2001 From: ntindle Date: Tue, 10 Aug 2021 22:37:50 -0500 Subject: [PATCH 01/13] feat: add differnet versions of workflow --- .github/workflows/build.yml | 17 +++++++++++++++++ .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..4e9458dce --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +name: build +on: pull_request + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + + - name: Install and build + run: | + npm install -g honkit + npm install + npm run honkit build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..70bb6e008 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Build and Deploy +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + if: github.repository == 'ntindle/algorithm-archive' + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + + - name: Install and build + run: | + npm install -g honkit + npm install + npm run honkit build + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + branch: gh-pages + folder: _book From 0249e649456cd4d048e15538128648d0ea757f97 Mon Sep 17 00:00:00 2001 From: ntindle Date: Tue, 10 Aug 2021 22:42:22 -0500 Subject: [PATCH 02/13] fix: use npx over npm i -g --- .github/workflows/build.yml | 3 +-- .github/workflows/deploy.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e9458dce..9c6e68b99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,5 @@ jobs: - name: Install and build run: | - npm install -g honkit npm install - npm run honkit build + npx honkit build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 70bb6e008..3849fb4e8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,9 +16,8 @@ jobs: - name: Install and build run: | - npm install -g honkit npm install - npm run honkit build + npx honkit build - name: Deploy uses: JamesIves/github-pages-deploy-action@4.1.4 From dce13299f8af404e861236d3189fad0682bc0238 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Wed, 11 Aug 2021 00:03:38 -0500 Subject: [PATCH 03/13] feat: add myself as contributor --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6f8f1e264..29d9e8e09 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -55,3 +55,4 @@ This file lists everyone, who contributed to this repo and wanted to show up her - Jonathan Dönszelmann - Ishaan Verma - Delphi1024 +- ntindle From b9f916bbae1d82f092b3bec109168317b2ffce91 Mon Sep 17 00:00:00 2001 From: ntindle Date: Wed, 11 Aug 2021 09:47:51 -0500 Subject: [PATCH 04/13] ci: update home repo --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3849fb4e8..361978a7a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,7 @@ on: jobs: build-and-deploy: runs-on: ubuntu-latest - if: github.repository == 'ntindle/algorithm-archive' + if: github.repository == 'algorithm-archivists/algorithm-archive' steps: - name: Checkout uses: actions/checkout@v2 From 9862d078118ba5b4a99ca9dc4522348df4ddd444 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Fri, 27 Aug 2021 03:11:35 +0000 Subject: [PATCH 05/13] feat: issue labeler --- .github/workflows/issue_comment.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/issue_comment.yml diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml new file mode 100644 index 000000000..ca1b94ba5 --- /dev/null +++ b/.github/workflows/issue_comment.yml @@ -0,0 +1,21 @@ +name: Add Label with Comment + +on: [issue_comment] + +jobs: + create_comment: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions-ecosystem/action-regex-match@v2 + id: regex-match + with: + text: ${{ github.event.comment.body }} + regex: '^/\[lang:\s*(.*?)\s*\]$' + + - uses: actions-ecosystem/action-add-labels@v1 + if: ${{ steps.regex-match.outputs.match != '' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: "lang: ${{ steps.regex-match.outputs.group1 }}" From 5eba0836b4e1b47253df55b1af9bff9d1a2c7220 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Fri, 27 Aug 2021 03:14:38 +0000 Subject: [PATCH 06/13] ci: test github labeler --- .github/workflows/issue_comment.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index ca1b94ba5..b36060661 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -19,3 +19,18 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} labels: "lang: ${{ steps.regex-match.outputs.group1 }}" + + - uses: actions-ecosystem/action-create-comment@v1 + if: ${{ steps.regex-match.outputs.match != '' }} + with: + github_token: ${{ secrets.github_token }} + body: | + Hello, @${{ github.actor }}! + + Test + + --- + + ${{ steps.regex-match.outputs.group1 }} + + --- From 5187ce89bb501dbdc7f2d30806bf1c457d4569f3 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Fri, 27 Aug 2021 03:15:38 +0000 Subject: [PATCH 07/13] fix: indentations man --- .github/workflows/issue_comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index b36060661..9365543e4 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -20,7 +20,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} labels: "lang: ${{ steps.regex-match.outputs.group1 }}" - - uses: actions-ecosystem/action-create-comment@v1 + - uses: actions-ecosystem/action-create-comment@v1 if: ${{ steps.regex-match.outputs.match != '' }} with: github_token: ${{ secrets.github_token }} From 9e860c5c2e69c58cb5d224a1a5647b1cc4a91406 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Fri, 27 Aug 2021 03:17:16 +0000 Subject: [PATCH 08/13] ci: test github labeler --- .github/workflows/issue_comment.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index 9365543e4..a67e94996 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -14,6 +14,8 @@ jobs: text: ${{ github.event.comment.body }} regex: '^/\[lang:\s*(.*?)\s*\]$' + - run: echo ${{ steps.regex-match.outputs }} + - uses: actions-ecosystem/action-add-labels@v1 if: ${{ steps.regex-match.outputs.match != '' }} with: From 6a26690251879254ca92883019634e50e41b3371 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Fri, 27 Aug 2021 03:19:13 +0000 Subject: [PATCH 09/13] ci: test github labeler --- .github/workflows/issue_comment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index a67e94996..43c96b865 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -12,9 +12,9 @@ jobs: id: regex-match with: text: ${{ github.event.comment.body }} - regex: '^/\[lang:\s*(.*?)\s*\]$' + regex: '/\[lang:\s*(.*?)\s*\]$' - - run: echo ${{ steps.regex-match.outputs }} + - run: echo ${{ steps.regex-match.outputs.match }} - uses: actions-ecosystem/action-add-labels@v1 if: ${{ steps.regex-match.outputs.match != '' }} From 2add5fa6dd05e815ed65c5bde59518db26f261fa Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Fri, 27 Aug 2021 03:22:05 +0000 Subject: [PATCH 10/13] ci: test github labeler --- .github/workflows/issue_comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index 43c96b865..6ee670746 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -12,7 +12,7 @@ jobs: id: regex-match with: text: ${{ github.event.comment.body }} - regex: '/\[lang:\s*(.*?)\s*\]$' + regex: '/\[lang:\s*(.*?)\s*\]' - run: echo ${{ steps.regex-match.outputs.match }} From 53436cd3120b0416e5aa26a7464cc2510947f29c Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Fri, 27 Aug 2021 03:24:10 +0000 Subject: [PATCH 11/13] ci: test github labeler --- .github/workflows/issue_comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index 6ee670746..33abe499e 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -12,7 +12,7 @@ jobs: id: regex-match with: text: ${{ github.event.comment.body }} - regex: '/\[lang:\s*(.*?)\s*\]' + regex: '\[lang:\s*(.*?)\s*\]' - run: echo ${{ steps.regex-match.outputs.match }} From 3f691798a0d92b21d518a1150e3baaa0477ac152 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Fri, 27 Aug 2021 03:28:38 +0000 Subject: [PATCH 12/13] ci: test github labeler --- .github/workflows/issue_comment.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index 33abe499e..89002aabc 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -14,25 +14,8 @@ jobs: text: ${{ github.event.comment.body }} regex: '\[lang:\s*(.*?)\s*\]' - - run: echo ${{ steps.regex-match.outputs.match }} - - uses: actions-ecosystem/action-add-labels@v1 if: ${{ steps.regex-match.outputs.match != '' }} with: github_token: ${{ secrets.GITHUB_TOKEN }} labels: "lang: ${{ steps.regex-match.outputs.group1 }}" - - - uses: actions-ecosystem/action-create-comment@v1 - if: ${{ steps.regex-match.outputs.match != '' }} - with: - github_token: ${{ secrets.github_token }} - body: | - Hello, @${{ github.actor }}! - - Test - - --- - - ${{ steps.regex-match.outputs.group1 }} - - --- From 314cb7dc285065f0c0b1c8297cb983dcb33d1cb8 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Fri, 27 Aug 2021 03:29:32 +0000 Subject: [PATCH 13/13] ci: test github labeler --- .github/workflows/issue_comment.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index 89002aabc..e7d87c53d 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -6,8 +6,6 @@ jobs: create_comment: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-ecosystem/action-regex-match@v2 id: regex-match with: