Skip to content

Update deploy.yml

Update deploy.yml #34

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ "master", 'dev' ]
paths-ignore:
- '**.md'
- '**.txt'
- '.gitignore'
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Check directory contents
run: ls -la
- name: Install dependencies
run: npm i
- name: Clean previous build
run: rm -rf dist
- name: Generate static site
run: |
npm run build:all
ls -la
# Clean development artifacts
rm -rf node_modules
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Clean workspace
run: rm -rf *
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: site-build-files
path: ./
- name: Remove CI files
run: rm -rf .github
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4