-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Migration de la documentation technique (#2711)
* move specs and test action * add PR template * merge openapi v3.1 files * test deploy on working branch * validate swagger * proofread API v3.1 spec * set deployment to releases only in github action * try-out x-topics
- Loading branch information
1 parent
2955a72
commit a96a39e
Showing
6 changed files
with
4,700 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#fixes (issues) | ||
|
||
## Description | ||
|
||
<!-- compléter ici --> | ||
|
||
## Checklist | ||
|
||
- [ ] [j'ai suivi les guidelines du "clean code"](https://gist.github.com/wojteklu/73c6914cc446146b8b533c0988cf8d29) | ||
- [ ] [j'ai mis à jour la documentation technique](https://www.notion.so/Documentation-technique-du-Registre-de-preuve-de-covoiturage-14b994bec93180f98a89da28aff88f32) | ||
- [ ] ajout ou mise à jour des tests unitaires | ||
- [ ] ajout ou mise à jour des tests d'intégration | ||
|
||
## Merge | ||
|
||
Je squash la PR et vérifie que le message de commit utilise | ||
[la convention d'Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#-commit-message-format) : | ||
|
||
``` | ||
<type>(<scope>): <short summary> | ||
│ │ │ | ||
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end. | ||
│ │ | ||
│ └─⫸ Commit Scope: proxy|acquisition|export|... | ||
│ | ||
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test | ||
``` | ||
Types de commit | ||
|
||
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) | ||
- ci: Changes to our CI configuration files and scripts (examples: Github Actions) | ||
- docs: Documentation only changes | ||
- feat: A new feature (Minor bump) | ||
- fix: A bug fix (Patch bump) | ||
- perf: A code change that improves performance | ||
- refactor: A code change that neither fixes a bug nor adds a feature | ||
- test: Adding missing tests or correcting existing tests | ||
|
||
Le _scope_ (optionnel) précise le module ou le composant impacté par le commit. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Deploy API documentation | ||
permissions: | ||
contents: read | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
push: | ||
branches: | ||
- chore/add-bump-action | ||
jobs: | ||
deploy-doc: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
|
||
# add files here | ||
strategy: | ||
matrix: | ||
include: | ||
- doc: api | ||
version: v3.1 | ||
token: BUMP_TOKEN_API | ||
- doc: api | ||
version: v3.0 | ||
token: BUMP_TOKEN_API | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Verify OpenAPI files | ||
run: | | ||
file="api/specs/${{ matrix.doc }}-${{ matrix.version }}.yaml" | ||
if [ ! -f "$file" ]; then | ||
echo "Error: $file does not exist" | ||
exit 1 | ||
fi | ||
- name: Validate OpenAPI syntax | ||
uses: swaggerexpert/swagger-editor-validate@v1 | ||
with: | ||
definition-file: api/specs/${{ matrix.doc }}-${{ matrix.version }}.yaml | ||
|
||
- name: Deploy | ||
uses: bump-sh/github-action@v1 | ||
with: | ||
doc: ${{ matrix.doc }} | ||
token: ${{ secrets[matrix.token] }} | ||
file: api/specs/${{ matrix.doc }}-${{ matrix.version }}.yaml | ||
branch: ${{ matrix.version }} |
Oops, something went wrong.