Skip to content

Update deploy.yml

Update deploy.yml #37

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: Generate static site
run: |
npm run build:all
ls -la
rm -rf node_modules
env:
NODE_ENV: production
OUTPUT_DIR: ./
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: site-build-files
path: ./
if-no-files-found: error
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: site-build-files
path: ./
- 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