Skip to content

Deploy to GitHub Pages #2

Deploy to GitHub Pages

Deploy to GitHub Pages #2

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ "dev" ]
paths-ignore:
- '**.md'
- '**.txt'
- '.github/**'
- '*.{yml,yaml,json}'
- '.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'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Create dist directory
run: mkdir -p dist
- name: Generate static site
run: npm run build:all
env:
NODE_ENV: production
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: './dist'
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: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2