-
-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: automated UI file updates (#2381)
## Description Automate UI file updates with dependabot & github actions. This will prevent outdated files and PR's like #2378 will be done automatically. This will add a commit to every dependabot as can be seen here: - Redoc: DjordyKoert#11 - Swagger: DjordyKoert#13 - github-actions (does not commit or error): DjordyKoert#12 docs: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions ## What type of PR is this? (check all applicable) - [ ] Bug Fix - [ ] Feature - [ ] Refactor - [ ] Deprecation - [ ] Breaking Change - [ ] Documentation Update - [x] CI ## Checklist - [ ] I have made corresponding changes to the documentation (`docs/`) - [ ] I have made corresponding changes to the changelog (`CHANGELOG.md`)
- Loading branch information
1 parent
f981465
commit ceb2fd8
Showing
6 changed files
with
62 additions
and
24 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ tests export-ignore | |
docs export-ignore | ||
phpunit export-ignore | ||
phpunit.xml.dist export-ignore | ||
utils export-ignore |
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,33 @@ | ||
name: Dependabot update UI files | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./utils | ||
|
||
permissions: | ||
contents: write | ||
|
||
if: github.event.pull_request.user.login == 'dependabot[bot]' | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- run: yarn install | ||
- name: Swagger UI | ||
run: yarn run swagger | ||
- name: Redocly | ||
run: yarn run redoc | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "[dependabot-skip] Update UI files" | ||
branch: ${{ github.head_ref }} |
This file was deleted.
Oops, something went wrong.
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,2 @@ | ||
node_modules | ||
yarn.lock |
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,21 @@ | ||
{ | ||
"description": "Script utils for nelmio/api-doc-bundle UI", | ||
"license": "MIT", | ||
"dependencies": { | ||
"redoc": "2.0.0", | ||
"swagger-ui-dist": "5.18.1" | ||
}, | ||
"scripts": { | ||
"swagger": "yarn run swagger:bundle && yarn run swagger:standalone && yarn run swagger:css", | ||
"swagger:bundle": "cp node_modules/swagger-ui-dist/swagger-ui-bundle.js* $npm_package_config_destination_swagger", | ||
"swagger:standalone": "cp node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js* $npm_package_config_destinationswagger", | ||
"swagger:css": "cp node_modules/swagger-ui-dist/swagger-ui.css* $npm_package_config_destination_swagger", | ||
"redoc": "cp node_modules/redoc/bundles/redoc.standalone.js $npm_package_config_destination_redoc" | ||
}, | ||
"config": { | ||
"destination": { | ||
"swagger": "../public/swagger-ui", | ||
"redoc": "../public/redocly" | ||
} | ||
} | ||
} |