Skip to content

Commit

Permalink
Merge pull request #25 from gopherguides/rename-module-md
Browse files Browse the repository at this point in the history
rename module.md to hype.md
  • Loading branch information
corylanou authored Sep 10, 2024
2 parents 8833481 + ec1e0fb commit 5b59796
Show file tree
Hide file tree
Showing 182 changed files with 1,730 additions and 450 deletions.
File renamed without changes.
45 changes: 20 additions & 25 deletions .github/workflows/hype.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
name: Generate README with Hype
on: [pull_request]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22.x"
cache-dependency-path: subdir/go.sum

- name: Install hype
run: go install github.com/gopherguides/hype/cmd/hype@latest

- name: Run hype
run: pushd .hype;hype export -format=markdown -f module.md > ../README.md;popd

- name: Commit README back to the repo
run: |-
git rev-parse --abbrev-ref HEAD
git config user.name 'GitHub Actions'
git config user.email '[email protected]'
git diff --quiet || (git add README.md && git commit -am "Updated README")
git push origin ${{github.event.pull_request.head.ref}}
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22.x"
cache-dependency-path: subdir/go.sum
- name: Install hype
run: go install github.com/gopherguides/hype/cmd/hype@latest
- name: Run hype
run: hype export -format=markdown -f hype.md > README.md
- name: Commit README back to the repo
run: |-
git rev-parse --abbrev-ref HEAD
git config user.name 'GitHub Actions'
git config user.email '[email protected]'
git diff --quiet || (git add README.md && git commit -am "Updated README")
git push origin ${{github.event.pull_request.head.ref}}
31 changes: 0 additions & 31 deletions .hype/actions/hype.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ install:
go install -v ./cmd/hype

hype:
pushd .hype;hype export -format=markdown -f module.md > ../README.md;popd
pushd .hype;hype export -format=markdown -f hype.md > ../README.md;popd
Loading

0 comments on commit 5b59796

Please sign in to comment.