Skip to content

Commit

Permalink
Add Build and Deploy OpenAPI configuration workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bitfl0wer committed Dec 23, 2024
1 parent 78b042c commit 144b255
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy-openapi-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Deploy OpenAPI configuration
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "npm"
cache-dependency-path: "./api/core/package-lock.json"
- name: Install TypeSpec and compile project
run: |
cd ./api/src/core/
npm install -g @typespec/compiler
npm install
tsp compile .
- name: Commit OpenAPI specification to repository
run: |
cd ../../
mv ./src/core/tsp-output/@typespec/openapi3/openapi.v1.0.yaml ./build/core-openapi3.yaml
git add ./build/*
git commit -m "[bot]update openapi3 schema"
git push

0 comments on commit 144b255

Please sign in to comment.