Disable wep page previews for bot deployments #472
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: Bot Deployment | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "tests/**" | |
- ".github/**" | |
- ".husky/**" | |
- ".vscode/**" | |
- "README.md" | |
- "sonar-project.properties" | |
- "jest.config.ts" | |
- ".eslintrc.json" | |
- ".prettierrc" | |
- ".nvmrc" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: metadata | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/${{ github.repository }} | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./deploy/Containerfile | |
push: true | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- uses: ./.github/actions/deploy | |
with: | |
ssh_user: ci | |
ssh_identity: ${{ vars.deploy_target_identity }} | |
ssh_host: ${{ secrets.deploy_target_host }} | |
ssh_port: ${{ secrets.deploy_target_port }} | |
ssh_key: ${{ secrets.deploy_target_key }} | |
- uses: appleboy/telegram-action@master | |
with: | |
to: ${{ vars.alerts_chat_id }} | |
token: ${{ secrets.NOTIFICATION_BOT_TOKEN }} | |
format: markdown | |
disable_web_page_preview: true | |
message: | | |
🤖 New bot version was successfully deployed! [${{ github.workflow }} #${{ github.run_number }}](https://github.com/hackerembassy/hackerembassy-tg-bot/actions/workflows/app-deployment.yml) |