From c39bd937b6a5526cc0de1f1a80c2a0db56ee2c5e Mon Sep 17 00:00:00 2001 From: Moanes Ben Amor Date: Thu, 26 Sep 2024 23:37:03 +0200 Subject: [PATCH] ci: build a redoc api description page --- .github/workflows/redoc.yml | 45 ++++++++++++++++++++ .idea/workspace.xml | 82 +++++++++++++++++++++++++++++-------- 2 files changed, 110 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/redoc.yml diff --git a/.github/workflows/redoc.yml b/.github/workflows/redoc.yml new file mode 100644 index 0000000..d26c238 --- /dev/null +++ b/.github/workflows/redoc.yml @@ -0,0 +1,45 @@ +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@v2 + + # use the public name of the action + - name: redoc-cli test + uses: seeebiii/redoc-cli-github-action@v8 + with: + args: 'bundle https://bitbucket.org/medicalinformatics/mainzelliste/raw/development/resources/Mainzelliste.OpenApi.Spec.yaml -o mainzelliste-api.yml' + - name: check result + run: | + ls -al + test -f mainzelliste-api.html || (echo "Missing mainzelliste-api.html from previous step." && exit 1) + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./out + # 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 c6b8470..aac8199 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,20 +5,8 @@ - - - - - - - - - - - - - - + + @@ -142,6 +187,9 @@ - \ No newline at end of file