From a0c57abadd4743bd39f9e140bc718130cd2c08f1 Mon Sep 17 00:00:00 2001 From: iCrawl Date: Tue, 11 Apr 2023 18:26:27 +0200 Subject: [PATCH] ci: uploading to before mv --- .github/workflows/documentation.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index a71cdd31b..b89945067 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -129,6 +129,15 @@ jobs: with: tag: ${{ github.ref_name }} + - name: Upload documentation to database + if: ${{ github.ref_type == 'tag' && matrix.package == steps.extract-tag.outputs.package }} + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} + uses: ./packages/actions/src/uploadDocumentation + with: + package: ${{ steps.extract-tag.outputs.package }} + version: ${{ steps.extract-tag.outputs.semver }} + - name: Move docs to correct directory if: ${{ github.ref_type == 'tag' && matrix.package == steps.extract-tag.outputs.package }} env: @@ -144,13 +153,12 @@ jobs: fi - name: Upload documentation to database - if: ${{ github.ref_type == 'tag' && matrix.package == steps.extract-tag.outputs.package }} + if: ${{ github.ref_type == 'branch' }} env: DATABASE_URL: ${{ secrets.DATABASE_URL }} uses: ./packages/actions/src/uploadDocumentation with: - package: ${{ steps.extract-tag.outputs.package }} - version: ${{ steps.extract-tag.outputs.semver }} + package: ${{ matrix.package }} - name: Move docs to correct directory if: ${{ github.ref_type == 'branch' }} @@ -165,14 +173,6 @@ jobs: mv docs/${PACKAGE}/docs/docs.api.json out/${PACKAGE}/${GITHUB_REF_NAME}.api.json fi - - name: Upload documentation to database - if: ${{ github.ref_type == 'branch' }} - env: - DATABASE_URL: ${{ secrets.DATABASE_URL }} - uses: ./packages/actions/src/uploadDocumentation - with: - package: ${{ matrix.package }} - - name: Commit and push run: | cd out