Skip to content

Commit

Permalink
Create build&deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kunwarsahni01 authored Dec 13, 2022
1 parent 488dfcf commit 027b69b
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build&deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build & Deploy

on:
push:
branches: [ "main" ]
# pull_request:
# branches: [ "main" ]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.102.3

steps:
- name: Checkout
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: hugo

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public

0 comments on commit 027b69b

Please sign in to comment.