Skip to content

Commit

Permalink
chore: adrstatus, fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
yamilmedina committed Aug 6, 2024
1 parent 9632b4a commit bd90e24
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/deploy-adr-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@ env:
jobs:
publish-pr:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'pull_request'
steps:
- name: Checkout project
uses: actions/checkout@v4

- name: Comment ADRs in PR
run: |
echo "# ADR Docs in this PR 📚:" > /tmp/new-adr
gh pr diff ${{ github.event.pull_request.number }} --name-only | grep docs/adr | xargs cat >> /tmp/new-adr
gh pr comment ${{ github.event.pull_request.number }} -F /tmp/new-adr --edit-last || gh pr comment ${{ github.event.pull_request.number }} -F /tmp/new-adr
publish-develop:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref_name == 'develop'
steps:
- name: Checkout project
uses: actions/checkout@v4
Expand All @@ -47,9 +33,17 @@ jobs:
adr-viewer --adr-path docs/adr --output docs/index.html
- name: Deploy docs 🚀
if: github.event_name == 'push' && github.ref_name == 'develop'
uses: JamesIves/[email protected]
with:
branch: gh-pages
clean: false
folder: docs
target-folder: docs

- name: Comment new ADR(s) in PR
if: github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'pull_request'
run: |
echo "# New ADR(s) in this PR 📚:" > /tmp/new-adr
gh pr diff ${{ github.event.pull_request.number }} --name-only | grep docs/adr | xargs cat >> /tmp/new-adr
gh pr comment ${{ github.event.pull_request.number }} -F /tmp/new-adr --edit-last || gh pr comment ${{ github.event.pull_request.number }} -F /tmp/new-adr

0 comments on commit bd90e24

Please sign in to comment.