From a68b950ec98dfb9a3c3b79fde576291dbd440de3 Mon Sep 17 00:00:00 2001 From: Vaclav R Date: Thu, 30 Jan 2025 17:41:38 +0100 Subject: [PATCH 1/4] add workflows --- .github/workflows/branches.yaml | 20 ++++++++++++++++++ .github/workflows/main.yaml | 37 +++++++++++++++++++++++++++++++++ docusaurus.config.ts | 6 ++++++ 3 files changed, 63 insertions(+) create mode 100644 .github/workflows/branches.yaml create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/branches.yaml b/.github/workflows/branches.yaml new file mode 100644 index 0000000..39996d3 --- /dev/null +++ b/.github/workflows/branches.yaml @@ -0,0 +1,20 @@ +name: build website +on: + push: +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build --throw-deprecation --trace-warnings diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..bc65b5a --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,37 @@ +name: deploy website +on: + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu-latest + environment: docs + permissions: + id-token: write + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: TODO + aws-region: us-west-2 + + - name: Upload files to S3 + run: | + aws s3 cp ./build s3://docs.ssv.network --recursive + diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 8754735..24c555d 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -117,3 +117,9 @@ const config: Config = { }; export default config; +// docusaurus.config.js +//module.exports = { +// onBrokenLinks: 'throw', + //onBrokenAnchors: 'throw', + //onBrokenMarkdownLinks: 'throw', +//}; From 35cec0447cc6e3e3d531a3329836e8eb7199bc1c Mon Sep 17 00:00:00 2001 From: Vaclav R Date: Thu, 30 Jan 2025 19:20:12 +0100 Subject: [PATCH 2/4] update --- .github/workflows/main.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index bc65b5a..6241750 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -28,10 +28,9 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v3 with: - role-to-assume: TODO - aws-region: us-west-2 + role-to-assume: ${{ secrets.DOCS_AWS_IAM_ROLE }} + aws-region: ${{ secrets.DOCS_AWS_REGION }} - name: Upload files to S3 run: | - aws s3 cp ./build s3://docs.ssv.network --recursive - + aws s3 cp ./build s3://${{ secrets.DOCS_AWS_S3_BUCKET }} --recursive From e02af79a97f23039203ba93e33925aacf8d8dd07 Mon Sep 17 00:00:00 2001 From: Vaclav R Date: Thu, 30 Jan 2025 19:22:30 +0100 Subject: [PATCH 3/4] remove docusaurus config for now --- docusaurus.config.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 24c555d..8754735 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -117,9 +117,3 @@ const config: Config = { }; export default config; -// docusaurus.config.js -//module.exports = { -// onBrokenLinks: 'throw', - //onBrokenAnchors: 'throw', - //onBrokenMarkdownLinks: 'throw', -//}; From 69e1a1588d282963a88f4784448d37512ded78ca Mon Sep 17 00:00:00 2001 From: Vaclav R Date: Fri, 31 Jan 2025 12:20:14 +0100 Subject: [PATCH 4/4] add codeowners --- CODEOWNERS | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..ac3e50e --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,8 @@ +# CODEOWNERS file + +# workflow files are sensitive +.github/workflows/* @vaclav-ssvlabs + +# +* @RaekwonIII @taylorferran @Alex-ssvlabs +