From 052a4dfc2143929370353c34888603c8ceb20be1 Mon Sep 17 00:00:00 2001 From: martyanov-av Date: Mon, 16 Oct 2023 18:54:48 +0300 Subject: [PATCH] feat: add workflows --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ .github/workflows/release.yml | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..81ffda2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +name: Build + +on: + pull_request: + +jobs: + build-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build + uses: diplodoc-platform/docs-build-action@v1 + with: + revision: "pr-${{ github.event.pull_request.number }}" + project-name: ${{ secrets.DIPLODOC_PROJECT_NAME }} + src-root: "./" + storage-bucket: ${{ secrets.DIPLODOC_STORAGE_BUCKET }} + storage-endpoint: ${{ vars.DIPLODOC_STORAGE_ENDPOINT }} + storage-access-key-id: ${{ secrets.DIPLODOC_ACCESS_KEY_ID }} + storage-secret-access-key: ${{ secrets.DIPLODOC_SECRET_ACCESS_KEY }} + storage-region: ${{ vars.DIPLODOC_STORAGE_REGION }} + shared-storage-bucket: "true" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..430e4f6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Release + +on: + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Release + uses: diplodoc-platform/docs-release-action@v1 + with: + revision: "${{ github.sha }}" + project-name: ${{ secrets.DIPLODOC_PROJECT_NAME }} + src-root: "./" + storage-bucket: ${{ secrets.DIPLODOC_STORAGE_BUCKET }} + storage-endpoint: ${{ vars.DIPLODOC_STORAGE_ENDPOINT }} + storage-access-key-id: ${{ secrets.DIPLODOC_ACCESS_KEY_ID }} + storage-secret-access-key: ${{ secrets.DIPLODOC_SECRET_ACCESS_KEY }} + storage-region: ${{ vars.DIPLODOC_STORAGE_REGION }} + shared-storage-bucket: "true" \ No newline at end of file