diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 396ce8e0..8a84d7f1 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -21,14 +21,32 @@ jobs: token: ${{ secrets.CHANGELOG_KEY }} repository: pestphp/website path: pestphp-website + - name: Read CHANGELOG.md + id: package + uses: juliangruber/read-file-action@v1 + with: + path: ./CHANGELOG.md + - name: Add file headers + uses: DamianReeves/write-file-action@v1.0 + with: + path: ./CHANGELOG.md + contents: | + --- + title: Changelog + description: Changelog + extends: _layouts.documentation + section: content + --- + ${{ steps.package.outputs.content }} + write-mode: overwrite - 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: - token: ${{ secrets.CHANGELOG_KEY }} - commit-message: Update changelog.md - committer: GitHub Action - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - title: 'Update changelog.md' - path: ./pestphp-website + token: ${{ secrets.CHANGELOG_KEY }} + commit-message: Update changelog.md + committer: GitHub Action + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + title: 'Update changelog.md' + path: ./pestphp-website