website: configure git user even from master #7
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: Deploy Docusaurus to GitHub Pages | |
on: | |
push: | |
branches: | |
- master # Replace with your branch name if different | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Check out the repository | |
- name: Check out the repository | |
uses: actions/checkout@v2 | |
# 2. Set up Node.js | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 # Use a stable Node.js version like 18 LTS | |
# 3. Configure Git | |
- name: Configure Git User | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
# 4. Install dependencies and deploy | |
- name: Install dependencies and deploy | |
run: | | |
cd website | |
npm install | |
npm run deploy |