Add automated grammar build pipeline and improve CI/CD #6
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: Deploy Extensions CDN | |
| on: | |
| release: | |
| types: [published] | |
| push: | |
| branches: [master] | |
| paths: | |
| - "extensions/*/extension.json" | |
| - "extensions/*/highlights.scm" | |
| - "registry.json" | |
| - "index.json" | |
| - "manifests.json" | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| if: github.repository == 'athasdev/extensions' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Regenerate catalog files | |
| run: | | |
| bun scripts/build-extensions-index.ts | |
| bun scripts/generate-manifests.ts | |
| - name: Sync extension configs to CDN | |
| uses: burnett01/rsync-deployments@7.0.2 | |
| with: | |
| switches: -avz --include='*/' --include='*.json' --include='*.scm' --exclude='*' | |
| path: extensions/ | |
| remote_path: ${{ secrets.EXTENSIONS_CDN_ROOT }}/ | |
| remote_host: ${{ secrets.VPS_HOST }} | |
| remote_user: ${{ secrets.VPS_USER }} | |
| remote_key: ${{ secrets.VPS_SSH_KEY }} | |
| remote_port: ${{ secrets.VPS_PORT || 22 }} | |
| - name: Sync catalog files to CDN | |
| uses: burnett01/rsync-deployments@7.0.2 | |
| with: | |
| switches: -avz | |
| path: registry.json index.json manifests.json | |
| remote_path: ${{ secrets.EXTENSIONS_CDN_ROOT }}/ | |
| remote_host: ${{ secrets.VPS_HOST }} | |
| remote_user: ${{ secrets.VPS_USER }} | |
| remote_key: ${{ secrets.VPS_SSH_KEY }} | |
| remote_port: ${{ secrets.VPS_PORT || 22 }} |