fix: api doc generation #557
Workflow file for this run
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: Generate API | |
on: | |
schedule: | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
inputs: | |
forceGenerate: | |
description: 'Force generate all api info' | |
default: '0' | |
required: true | |
push: | |
branches: | |
- master | |
- fix-apidoc | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
APP_ENV: dev | |
APP_URL: http://localhost:8000 | |
DATABASE_URL: mysql://[email protected]/shopware | |
steps: | |
- name: Start MySQL | |
shell: bash | |
run: | | |
sudo mv /var/lib/mysql /var/lib/mysql-old | |
sudo mkdir /var/lib/mysql | |
sudo mount -t tmpfs tmpfs /var/lib/mysql -o size=1G | |
sudo -u mysql mysqld --datadir=/var/lib/mysql --default-time-zone=SYSTEM --initialize-insecure | |
sudo systemctl start mysql | |
- | |
name: Install Shopware CLI | |
uses: FriendsOfShopware/shopware-cli-action@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Project | |
run: shopware-cli project create shopware 6.5.0.0 | |
- name: Install Shopware | |
working-directory: shopware | |
run: php bin/console system:install --basic-setup --create-database --force | |
- name: Clone api-doc | |
uses: actions/checkout@v3 | |
with: | |
path: api-doc | |
- name: Dump Info | |
run: | | |
php generate-api-info.php | |
env: | |
FORCE_GENERATE: ${{ inputs.forceGenerate }} | |
- uses: EndBug/add-and-commit@v4 | |
with: | |
add: '.' | |
cwd: 'api-doc' | |
author_name: Frosh Automation | |
author_email: [email protected] | |
message: 'chore: Updated Swagger definitions' | |
env: | |
GITHUB_TOKEN: ${{ secrets.FROSH_CI_TOKEN }} |