Merge pull request #6 from Adventure-Tech/feature/availability-api #13
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
name: Bundle Open Api Spec | |
on: | |
push: | |
branches: [main] | |
jobs: | |
bundle-open-api-spec: | |
name: Bundle Open Api Spec | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Bundle specs | |
run: npx @redocly/cli bundle src/bilberry/openapi.yaml -o dist/bilberry-api.yaml --ext yaml | |
- name: Commit files | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add ./dist | |
git commit -a -m "automatically bundle open api spec" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |