Skip to content

github-pages: Deploy via action #3

github-pages: Deploy via action

github-pages: Deploy via action #3

name: Build ESPlant-Pages
on:
push:
branches:
- main
paths:
- "ESPlant-Pages/**"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
working-directory: ./ESPlant-Pages
run: npm install
- name: Build pages
working-directory: ./ESPlant-Pages
run: npm run build
- name: upload pages
uses: actions/upload-artifact@v3
with:
name: github-pages
path: ESPlant-Pages/dist
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2