New day new entry (#10) #21
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: Build and deploy the blog | |
on: | |
push: | |
branches: [ "master" ] | |
paths: | |
- "blogs/**" | |
- "journal/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
cache: 'npm' | |
cache-dependency-path: docusaurus/package-lock.json | |
- name: Install and Build | |
run: | | |
npm ci | |
npm run build | |
working-directory: docusaurus | |
- 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 }} | |