From 010322537607c653522c91069f8ecd9f185a8cbb Mon Sep 17 00:00:00 2001 From: Flying Sausages Date: Sun, 10 Jan 2021 15:07:46 +0100 Subject: [PATCH 1/3] Add GH action for secret management and manage algolia secret --- .github/workflows/website.yml | 8 ++++++++ docusaurus.config.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index faceace5..dbd87881 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -25,6 +25,14 @@ jobs: npm i fi npm run build + secrets: + runs-on: ubuntu-latest + steps: + - uses: jwsi/secret-parser@v1 + - with: + filename: docusaurus.config.json + secret-name: ALGOLIA_API_KEY + secret-value: ${{ secrets.ALGOLIA_API_KEY }} gh-release: if: github.event_name != 'pull_request' runs-on: ubuntu-latest diff --git a/docusaurus.config.js b/docusaurus.config.js index aca3c801..e41db5b8 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -108,7 +108,7 @@ module.exports = { trackingID: "UA-104631777-1" }, algolia: { - apiKey: "zz", + apiKey: "${{ secrets.ALGOLIA_API_KEY }}", indexName: "swizzin", }, }, From bc9ab1c54cd9c1448f0329b48a1739c1684aa2a7 Mon Sep 17 00:00:00 2001 From: Flying Sausages Date: Sun, 10 Jan 2021 15:14:51 +0100 Subject: [PATCH 2/3] what am i doing --- .github/workflows/website.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index dbd87881..bb589122 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -28,8 +28,9 @@ jobs: secrets: runs-on: ubuntu-latest steps: + - name: Secret Parser - uses: jwsi/secret-parser@v1 - - with: + with: filename: docusaurus.config.json secret-name: ALGOLIA_API_KEY secret-value: ${{ secrets.ALGOLIA_API_KEY }} From 527b57408b9cb10936ccdc71fefb069c1b9d080c Mon Sep 17 00:00:00 2001 From: Flying Sausages Date: Sun, 10 Jan 2021 15:18:18 +0100 Subject: [PATCH 3/3] Move into website deploy? --- .github/workflows/website.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index bb589122..85c39fc3 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -25,19 +25,15 @@ jobs: npm i fi npm run build - secrets: + gh-release: + if: github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - - name: Secret Parser - uses: jwsi/secret-parser@v1 with: filename: docusaurus.config.json secret-name: ALGOLIA_API_KEY secret-value: ${{ secrets.ALGOLIA_API_KEY }} - gh-release: - if: github.event_name != 'pull_request' - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: