name: CD deploy main permissions: contents: read on: push: branches: - main jobs: website-changed-files: uses: ./.github/workflows/changed-files.yaml with: files: packages/twenty-website/** deploy-main: needs: website-changed-files timeout-minutes: 3 runs-on: ubuntu-latest steps: - name: Mint twenty-infra dispatch token id: app-token uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 with: client-id: ${{ vars.TWENTY_WORKFLOW_DISPATCHER_CLIENT_ID }} private-key: ${{ secrets.TWENTY_WORKFLOW_DISPATCHER_PRIVATE_KEY }} owner: twentyhq repositories: twenty-infra permission-actions: write - name: Trigger twenty-infra deploy env: GH_TOKEN: ${{ steps.app-token.outputs.token }} DEPLOY_WEBSITE: ${{ needs.website-changed-files.outputs.any_changed }} run: | gh workflow run auto-deploy-main.yaml --repo twentyhq/twenty-infra --ref main -f deploy_website="$DEPLOY_WEBSITE"