diff --git a/.github/workflows/pr-deploy-preview.yml b/.github/workflows/pr-deploy-preview.yml index 9e301764a..a96cd3b2b 100644 --- a/.github/workflows/pr-deploy-preview.yml +++ b/.github/workflows/pr-deploy-preview.yml @@ -1,9 +1,8 @@ name: Deploy preview for PR on: - pull_request: - types: [opened, synchronize, reopened] - # branches: [main] + push: + branches: [main] # Allow manual runs from the Actions tab workflow_dispatch: diff --git a/.github/workflows/pr-post-comment.yml b/.github/workflows/pr-post-comment.yml new file mode 100644 index 000000000..fcdb802c2 --- /dev/null +++ b/.github/workflows/pr-post-comment.yml @@ -0,0 +1,21 @@ +on: + # Trigger the workflow on push or pull request + pull_request: + types: [opened, synchronize, reopened] + +jobs: + comment: + runs-on: ubuntu-latest + env: + HUGO_BASEURL: "https://preview-developer.espressif.com/pr${{ github.event.pull_request.number }}/" + steps: + - uses: actions/github-script@v7 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '👋 Test comment in PR${{ github.event.pull_request.number }} in $HUGO_BASEURL!' + })