Skip to content

Build & Publish Docker Image #9

Build & Publish Docker Image

Build & Publish Docker Image #9

Workflow file for this run

name: Build & Deploy
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20']
name: Build using Node v${{ matrix.node-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
env:
CI: true
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist
branch: gh-pages