Skip to content

Commit eaa28c1

Browse files
committed
fix: deploy workflow - set git identity + correct projectName
- Add git config user.email/name for github-actions bot - Fix projectName from 'neriteorg.github.io' to 'docs' (actual repo name) - Use GITHUB_TOKEN for auth instead of SSH - Add contents:write permission - This fixes the March 30 deploy failure
1 parent b8af774 commit eaa28c1

2 files changed

Lines changed: 13 additions & 16 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,14 @@ on:
55
branches:
66
- main
77
workflow_dispatch:
8-
inputs:
9-
environment:
10-
description: 'Environment to deploy to'
11-
required: true
12-
default: 'production'
13-
type: choice
14-
options:
15-
- production
16-
- staging
17-
version:
18-
description: 'Version to deploy'
19-
required: false
20-
type: string
8+
9+
permissions:
10+
contents: write
2111

2212
jobs:
2313
deploy:
2414
runs-on: ubuntu-latest
25-
15+
2616
steps:
2717
- name: Checkout code
2818
uses: actions/checkout@v4
@@ -37,6 +27,13 @@ jobs:
3727
run: npx yarn install
3828

3929
- name: Build and Deploy
30+
env:
31+
GIT_USER: git
32+
USE_SSH: false
33+
DEPLOYMENT_BRANCH: gh-pages
34+
CURRENT_BRANCH: main
4035
run: |
36+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
37+
git config --global user.name "github-actions[bot]"
4138
npx yarn build
42-
GIT_USER=cupOJoseph npx yarn deploy
39+
GIT_PASS=${{ github.token }} npx yarn deploy

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const config = {
2222
// GitHub pages deployment config.
2323
// If you aren't using GitHub pages, you don't need these.
2424
organizationName: "NeriteOrg", // Usually your GitHub org/user name.
25-
projectName: "neriteorg.github.io", // Usually your repo name.
25+
projectName: "docs", // Usually your repo name.
2626
deploymentBranch: "gh-pages",
2727
trailingSlash: false,
2828

0 commit comments

Comments
 (0)