Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add restylers-docs, generates _docs/restylers.md #865

Merged
merged 5 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: tools
path: ${{ steps.stack.outputs.local-install-root }}/bin/restylers
path: "${{ steps.stack.outputs.local-install-root }}/bin/*"
if-no-files-found: error

changes:
Expand Down Expand Up @@ -148,6 +148,41 @@ jobs:
manifest: ./restylers.yaml
dry-run: true

update-docs:
if: ${{ github.event_name == 'pull_request' }}
needs:
- tools
- restylers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- uses: actions/download-artifact@v4
with: {name: tools}

- uses: actions/download-artifact@v4
with: {name: manifest}

- name: Update and commit _docs
run: |
chmod +x ./restylers-docs

./restylers-docs "$GH_SHA" restylers.yaml > _docs/restylers.md

git config user.name "github-actions[bot]"
git config user.email "[email protected]"

if ! git commit -m "Update docs" _docs/restylers.md; then
echo "No documentation changes"
exit 0
fi

git push
env:
GH_SHA: ${{ github.sha }}

release:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [restylers]
Expand Down
3 changes: 3 additions & 0 deletions .headroom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ source-paths:
- _tools/restylers/app
- _tools/restylers/src
- _tools/restylers/test
- _tools/restylers-docs/app
- _tools/restylers-docs/src
- _tools/restylers-docs/test


## If set to 'true', Headroom tries to detect whether any VCS (like GIT) is used
Expand Down
Loading
Loading