Update Chapter 1.md #23
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 to GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.2.2 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4.1.0 | |
with: | |
node-version: '23.3.0' | |
- name: Upgrade npm | |
run: npm install -g npm@latest | |
- name: Install dependencies | |
run: npm install | |
- name: Build project | |
run: | | |
export CI=false | |
npm run build --silent | |
# run: npm run build | |
- name: Verify build directory | |
run: ls -la ./build | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4.0.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build | |
publish_branch: gh-pages |