Skip to content

Build & Deploy

Build & Deploy #868

Workflow file for this run

name: Build & Deploy
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '12'
- name: Hugo setup
uses: peaceiris/[email protected]
with:
hugo-version: 0.76.5
extended: true
- name: NPM install
run: npm install
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
deploy:
environment:
name: github-pages
url: webandwine.org
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1