replace tildas with users home directory when executing commands #39
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.23.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 'actions@github.com' | |
git diff --quiet || (git add README.md && git commit -am "Updated README") | |
git push origin ${{github.event.pull_request.head.ref}} |