diff --git a/.github/workflows/generate-docs.yml b/.github/workflows/generate-docs.yml new file mode 100644 index 000000000..a66934e8f --- /dev/null +++ b/.github/workflows/generate-docs.yml @@ -0,0 +1,45 @@ +name: Generate Documentation + +on: + push: + branches: + - main + +jobs: + docs: + name: Generate Documentation + + runs-on: ubuntu-latest + + environment: ethers-tests + env: + FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }} + + steps: + - uses: actions/setup-node@v1 + with: + node-version: 18.x + + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: "0" + + - name: Install dependencies + run: npm ci + + - name: Install Flatworm + run: npm install --no-save 'https://github.com/ricmoo/flatworm.git#tsdocs' + + - name: Build Documentation + run: node node_modules/flatworm/lib/test-api-index ./docs.wrm/config.js + + - name: Upload documentation to to docs.ethers.org + uses: ethers-io/sync-s3-action@main + with: + aws_access_key_id: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY}} + aws_s3_bucket: ethers.org + source_folder: 'output/docs/' + destination_prefix: 'docs/' + aws_cloudfront_id: ${{ secrets.DOCS_AWS_CLOUDFRONT_ID }} diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml index 428190e6f..df7c00488 100644 --- a/.github/workflows/test-ci.yml +++ b/.github/workflows/test-ci.yml @@ -4,6 +4,8 @@ on: push: branches: - main + paths: + - "src.ts/**" jobs: @@ -97,44 +99,3 @@ jobs: source_folder: 'output/' destination_prefix: 'build/output/' aws_cloudfront_id: ${{ secrets.BUILD_AWS_CLOUDFRONT_ID }} - - docs: - - name: Generate Documentation - - runs-on: ubuntu-latest - - environment: ethers-tests - env: - FAUCET_PRIVATEKEY: ${{ secrets.FAUCET_PRIVATEKEY }} - - continue-on-error: true - - steps: - - uses: actions/setup-node@v1 - with: - node-version: 18.x - - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: "0" - - - name: Install dependencies - run: npm ci - - - name: Install Flatworm - run: npm install --no-save 'https://github.com/ricmoo/flatworm.git#tsdocs' - - - name: Build Documentation - run: node node_modules/flatworm/lib/test-api-index ./docs.wrm/config.js - - - name: Upload documentation to to docs.ethers.org - uses: ethers-io/sync-s3-action@main - with: - aws_access_key_id: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY}} - aws_s3_bucket: ethers.org - source_folder: 'output/docs/' - destination_prefix: 'docs/' - aws_cloudfront_id: ${{ secrets.DOCS_AWS_CLOUDFRONT_ID }}