From 0b62361a0ebce22595aae48d9bb82081d8b7fbd8 Mon Sep 17 00:00:00 2001 From: Moanes Ben Amor Date: Fri, 27 Sep 2024 09:57:08 +0200 Subject: [PATCH] ci: add a new job in next.js workflow to build a redoc api documentation page --- .github/workflows/nextjs.yml | 16 +++++++++++++++- .github/workflows/redoc.yml | 37 ------------------------------------ .idea/workspace.xml | 15 +++++++++++---- 3 files changed, 26 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/redoc.yml diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 5b98198..399b534 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -80,13 +80,27 @@ jobs: with: path: ./out + build_redoc: + runs-on: ubuntu-latest + needs: build + name: Build redoc + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: build doc + run: npx @redocly/cli build-docs https://bitbucket.org/medicalinformatics/mainzelliste/raw/development/resources/Mainzelliste.OpenApi.Spec.yaml -o out/openapi/mainzelliste-api.html + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./out/openapi + # Deployment job deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest - needs: build + needs: build_redoc steps: - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/redoc.yml b/.github/workflows/redoc.yml deleted file mode 100644 index c55e801..0000000 --- a/.github/workflows/redoc.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: test-deploy - -# Run on each push to master -on: - push: - branches: [ "develop" ] - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -jobs: - build_redoc: - runs-on: ubuntu-latest - name: Build redoc - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: build doc - run: npx @redocly/cli build-docs https://bitbucket.org/medicalinformatics/mainzelliste/raw/development/resources/Mainzelliste.OpenApi.Spec.yaml -o openapi/mainzelliste-api.html - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ./openapi - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build_redoc - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 42a6b7e..ed941b5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,8 +5,7 @@ - - +