From f0408cb5fa4d23dce86723abab537cc51e066b06 Mon Sep 17 00:00:00 2001 From: Erez Tourjeman <94870094+erez-paraswap@users.noreply.github.com> Date: Wed, 12 Oct 2022 16:48:03 +0100 Subject: [PATCH 1/3] Deploy github action --- .github/workflows/build-and-deploy-docs.yml | 53 +++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/build-and-deploy-docs.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml new file mode 100644 index 00000000..458cd27a --- /dev/null +++ b/.github/workflows/build-and-deploy-docs.yml @@ -0,0 +1,53 @@ +name: Build and deploy Docs + +on: + push: + branches: + - master + - chore/docs-auto-update + workflow_dispatch: + +concurrency: + group: ${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + +env: + frontend_name: sdk + build_command: yarn docs + assets_location: ./docs/html + +jobs: + build-and-deploy-frontend: + name: Build and deploy frontend + runs-on: ubuntu-latest + + steps: + - name: Checkout Composite Actions Repository + uses: actions/checkout@v2 + with: + repository: paraswap/paraswap-github-actions + ref: master + token: ${{ secrets.PARASWAP_GITHUB_ACTIONS_PAT }} + path: .github/paraswap-github-actions + + - name: Build and deploy frontend using composite action + uses: ./.github/paraswap-github-actions/build-and-deploy-frontend + with: + frontend_name: ${{ env.frontend_name }} + build_command: ${{ env.build_command }} + assets_location: ${{ env.assets_location }} + repository_sha: ${{ github.sha}} + event_name: ${{ github.event_name }} + authentication_token: ${{ secrets.AUTHENTICATION_KEY }} + authorization_token: ${{ secrets.AUTHORIZATION_KEY }} + data_center: ${{ secrets.DATA_CENTER }} + + # We re-checkout composite actions repository due to a known bug that if composite action does its own checkout, it deletes any previous checkouts + # thus, the post action fails on not finding the composite action we checked-out. See: https://github.com/actions/runner/issues/1300 + - name: ReCheckout Composite Actions Repository + uses: actions/checkout@v2 + with: + repository: paraswap/paraswap-github-actions + ref: master + token: ${{ secrets.PARASWAP_GITHUB_ACTIONS_PAT }} + path: .github/paraswap-github-actions \ No newline at end of file From 575b603a4ab226e2417e80c8c03abce846f89dde Mon Sep 17 00:00:00 2001 From: Erez Tourjeman <94870094+erez-paraswap@users.noreply.github.com> Date: Wed, 12 Oct 2022 17:22:30 +0100 Subject: [PATCH 2/3] Limit build to html --- .github/workflows/build-and-deploy-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml index 458cd27a..a3ee286b 100644 --- a/.github/workflows/build-and-deploy-docs.yml +++ b/.github/workflows/build-and-deploy-docs.yml @@ -13,7 +13,7 @@ concurrency: env: frontend_name: sdk - build_command: yarn docs + build_command: yarn docs:html assets_location: ./docs/html jobs: From 8d6cd32dba8fbb0208231ca5b1e46242457d59f8 Mon Sep 17 00:00:00 2001 From: Erez Tourjeman <94870094+erez-paraswap@users.noreply.github.com> Date: Wed, 12 Oct 2022 19:34:28 +0100 Subject: [PATCH 3/3] Remove feature branch from automated action trigger --- .github/workflows/build-and-deploy-docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml index a3ee286b..4d45a340 100644 --- a/.github/workflows/build-and-deploy-docs.yml +++ b/.github/workflows/build-and-deploy-docs.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - chore/docs-auto-update workflow_dispatch: concurrency: