on-backend-deploy #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
repository_dispatch: | |
types: [on-backend-deploy] | |
jobs: | |
generate_types: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Install openapi-typescript | |
run: npm i -g openapi-typescript | |
- name: Run openapi-typescript | |
run: npx openapi-typescript https://gr.lnkshrt.xyz/openapi.json -o ./src/lib/api_schema.d.ts | |
- name: Commit file | |
run: | | |
git add src/lib/api_schema.d.ts | |
git commit -m "chore: generate API types" | |
git push |