Skip to content

Commit

Permalink
specify git user email and name
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamume committed Aug 16, 2024
1 parent d5592b6 commit 30eb5b3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/deploy-blog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ jobs:

- name: Deploy
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
npm run deploy
working-directory: docusaurus
env:
GIT_USER: github-actions
GIT_USER: ${{ github.actor }}
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}

14 changes: 14 additions & 0 deletions journal/20240816-daily-journal.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,17 @@ So, that worked. But only halfway. The last step `npm run deploy` failed asking
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}
```
I think it should work. I'm just not confident about the `GIT_USER` part. Should I use my github username there instead? Anyways, let's try pushing and see how it goes.

The action run was succesful but it still didn't deploy, complaining about setting git user email and stuff. So, let's try with

```yaml
- name: Deploy
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
npm run deploy
working-directory: docusaurus
env:
GIT_USER: ${{ github.actor }}
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}
```

0 comments on commit 30eb5b3

Please sign in to comment.