Generate Shopware Plugin Index #7273
This file contains hidden or 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 Shopware Plugin Index | |
| on: | |
| schedule: | |
| - cron: '*/30 * * * *' # Weekly schedule | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "generate-index" | |
| cancel-in-progress: false | |
| jobs: | |
| update-index: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: ⬇️ Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: ⬇️ Download latest release | |
| run: | | |
| curl -s https://api.github.com/repos/nuonic-digital/plugin-data/releases/latest \ | |
| | grep "browser_download_url" \ | |
| | cut -d : -f 2,3 \ | |
| | tr -d \" \ | |
| | grep Linux_x86_64 \ | |
| | wget -qi - | |
| tar -xzf plugin-data_Linux_x86_64.tar.gz && rm plugin-data_Linux_x86_64.tar.gz | |
| chmod +x plugin-data-extractor | |
| - name: ⚡️ Run Shopware Plugin Index Generator | |
| run: | | |
| ./plugin-data-extractor | |
| mkdir dist | |
| mv index.html dist/index.html | |
| mv shopware_extensions.json dist/shopware_extensions_v1.json | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'dist' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |