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..6241750 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,36 @@ +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: ${{ secrets.DOCS_AWS_IAM_ROLE }} + aws-region: ${{ secrets.DOCS_AWS_REGION }} + + - name: Upload files to S3 + run: | + aws s3 cp ./build s3://${{ secrets.DOCS_AWS_S3_BUCKET }} --recursive 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 +