Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: automated UI file updates #2381

Merged
merged 10 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ tests export-ignore
docs export-ignore
phpunit export-ignore
phpunit.xml.dist export-ignore
utils export-ignore
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/utils"
schedule:
interval: "daily"
versioning-strategy: increase
33 changes: 33 additions & 0 deletions .github/workflows/dependabot.yml
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 }}
24 changes: 0 additions & 24 deletions update-js.sh

This file was deleted.

2 changes: 2 additions & 0 deletions utils/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
yarn.lock
21 changes: 21 additions & 0 deletions utils/package.json
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",
DjordyKoert marked this conversation as resolved.
Show resolved Hide resolved
"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"
}
}
}
Loading