From 07c5ce94bea15d84d47cf9cbb09e040283ff0b55 Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Wed, 10 Aug 2022 15:57:56 -0500 Subject: [PATCH 1/2] ci: optimize test runs We had a lot of duplicate test runs, this optimizes that --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3d83d703..dd8470eff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: jobs: build: From 66791a6968d1e33fc21388be4b08313cd06dd85a Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Wed, 10 Aug 2022 15:58:55 -0500 Subject: [PATCH 2/2] ci: perform dry run docs sync on every push --- .github/workflows/docs.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c161dd7e4..954ea4be3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,10 +1,7 @@ name: Sync `documentation` directory to ReadMe -# Run workflow for every push to the `main` branch -on: - push: - branches: - - main +# Run workflow for every push +on: push jobs: sync: @@ -44,7 +41,17 @@ jobs: # we run the `rdme` GitHub Action to sync the Markdown file # in the `documentation` directory. # Here's the page we're syncing: https://docs.readme.com/docs/rdme + + # First we're going to perform a dry run of syncing process. + # We do this on every push to ensure that an actual sync will work properly + - name: Sync docs to ReadMe (dry run) + uses: ./ + with: + rdme: docs ./documentation --key=${{ secrets.README_DEVELOPERS_API_KEY }} --version=2.0 --dryRun + + # And finally, we perform an actual sync to ReadMe if we're on the main branch - name: Sync docs to ReadMe + if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' # We use the `main` branch as ref for GitHub Action # This is NOT recommended, as it can break your workflows without notice! # We recommend specifying a fixed version, i.e. @7.0