diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000000..b2db37e780 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,38 @@ +name: Docs + +on: + push: + branches: [main] + pull_request: # TODO: Remove after testing + workflow_dispatch: # can be manually triggered + +jobs: + deploy-docs: + runs-on: ubuntu-latest + steps: + - + uses: actions/checkout@v2 + - + uses: actions/setup-node@v1 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - + name: Install Deps + run: npm ci + - + name: Build + run: npm run build + - + name: Generate docs + run: npm run docs + - + uses: jakejarvis/s3-sync-action@v0.5.1 + with: + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: 'us-east-1' + SOURCE_DIR: 'docs'