Skip to content

test: Update deploy.yml #3

test: Update deploy.yml

test: Update deploy.yml #3

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- test-structure # Trigger on pushes to the 'test-structure' branch
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20' # Install the specified Node.js version
- name: Install dependencies
run: npm ci
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: ./ # Upload the entire root directory as the artifact
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./ # Deploy from the root of the artifact
publish_branch: gh-pages
force_orphan: true