mirror of
https://github.com/ivuorinen/generic-landing-page.git
synced 2026-02-03 07:44:24 +00:00
44 lines
843 B
YAML
44 lines
843 B
YAML
name: Build example page
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [16.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Build production assets
|
|
run: |
|
|
npm install
|
|
npm run prod --if-present
|
|
|
|
- name: Store artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: build-site
|
|
path: dist
|
|
|
|
- name: Build GitHub Pages
|
|
uses: crazy-max/ghaction-github-pages@v2.6.0
|
|
with:
|
|
build_dir: dist
|
|
jekyll: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|