diff --git a/.github/workflows/release.yml b/.github/workflows/ci.yml similarity index 58% rename from .github/workflows/release.yml rename to .github/workflows/ci.yml index d25eb65..99945de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,23 @@ --- name: Release -on: - push: - branches: - - main +on: push jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: make docs + - name: Verify no changes after docs build + run: | + git diff --exit-code + release-please: runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' steps: - uses: jimeh/release-please-manifest-action@v1 id: release diff --git a/Makefile b/Makefile index c3f277e..8bafe03 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,10 @@ +.PHONY: docs +docs: readme + +.PHONY: readme +readme: check-npx action-docs + npx --yes prettier --print-width 80 --prose-wrap always --write README.md + .PHONY: action-docs action-docs: check-npx npx --yes action-docs --update-readme