diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 008bf67e..396ce8e0 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,21 +1,28 @@ -name: Update documentation CHANGELOG +name: Changelog on: push: branches: [ master ] paths: - CHANGELOG.md + pull_request: + branches: [ master ] + paths: + - CHANGELOG.md jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Add file to filesystem - run: | - git clone https://github.com/pestphp/website pestphp-website - cp CHANGELOG.md pestphp-website/source/docs - shell: bash + - name: Checkout website repository + uses: actions/checkout@v2 + with: + token: ${{ secrets.CHANGELOG_KEY }} + repository: pestphp/website + path: pestphp-website + - name: Copy CHANGELOG to website repository + run: cp CHANGELOG.md pestphp-website/source/docs/changelog.md - name: Create Pull Request uses: peter-evans/create-pull-request@v2 with: @@ -24,4 +31,4 @@ jobs: committer: GitHub Action author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> title: 'Update changelog.md' - path: ./pestphp-website \ No newline at end of file + path: ./pestphp-website