Deploy @roll-stack/storefront-telegram #76
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 @roll-stack/storefront-telegram | |
| on: | |
| workflow_run: | |
| workflows: ["Docker Nightly", "Docker Release"] | |
| types: | |
| - completed | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - url: "https://sushi-love.ru" | |
| environment: "Production Storefront Telegram" | |
| deployment: "storefront-telegram" | |
| namespace: "sushi" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| deployments: write | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - uses: chrnorm/deployment-action@v2 | |
| name: Create GitHub deployment | |
| id: deployment | |
| with: | |
| token: '${{ github.token }}' | |
| environment-url: ${{ matrix.url }} | |
| environment: ${{ matrix.environment }} | |
| - name: Connect to k8s cluster and restart deployment | |
| uses: actions-hub/kubectl@master | |
| env: | |
| KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} | |
| with: | |
| args: rollout restart deployment/${{ matrix.deployment }} -n ${{ matrix.namespace }} | |
| - name: Update deployment status (success) | |
| if: success() | |
| uses: chrnorm/deployment-status@v2 | |
| with: | |
| token: '${{ github.token }}' | |
| environment-url: ${{ steps.deployment.outputs.environment_url }} | |
| deployment-id: ${{ steps.deployment.outputs.deployment_id }} | |
| state: 'success' | |
| - name: Update deployment status (failure) | |
| if: failure() | |
| uses: chrnorm/deployment-status@v2 | |
| with: | |
| token: '${{ github.token }}' | |
| environment-url: ${{ steps.deployment.outputs.environment_url }} | |
| deployment-id: ${{ steps.deployment.outputs.deployment_id }} | |
| state: 'failure' |