# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: Deploy an app on: push: branches: - main jobs: deploy: name: Deploy to Slack runs-on: ubuntu-latest steps: - name: Checkout the repo uses: actions/checkout@v7 with: persist-credentials: false - name: Deploy the app uses: slackapi/slack-github-action/cli@v4.1.0 with: command: "deploy --app ${{ vars.SLACK_APP_ID }} --force" token: ${{ secrets.SLACK_SERVICE_TOKEN }} - name: Post a deployment message uses: slackapi/slack-github-action@v4.1.0 with: errors: true method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} text: "Deployed to Slack from ${{ github.sha }}"