Skip to content

chore: adrstatus

chore: adrstatus #4

Workflow file for this run

name: Deploy ADR Docs
on:
push:
branches: [ 'develop', 'chore/adr-and-tests' ]
pull_request:
branches: [ develop ]
types: [ opened, synchronize ]
paths: [ 'docs/adr/**' ]
permissions:
contents: write
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
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_HEAD_REF: ${{github.head_ref}}
run: |
echo "# ADR Docs in this PR πŸ“š:" > /tmp/new-adr
gh pr diff "$GH_HEAD_REF" --name-only | grep docs/adr | xargs cat >> /tmp/new-adr
gh pr comment 3288 -F /tmp/new-adr --edit-last
publish-develop:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref_name == 'develop'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Install pip for adr-viewer
run: |
sudo apt-get update
sudo apt-get install -y python3-pip
pip install adr-viewer
- name: Generate ADR docs
run: |
adr-viewer --adr-path docs/adr --output docs/index.html
- name: Deploy docs πŸš€
uses: JamesIves/[email protected]
with:
branch: gh-pages
clean: false
folder: docs
target-folder: docs