Skip to content

Commit

Permalink
add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
addozhang committed Sep 15, 2023
1 parent 437b1fd commit 2236882
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/hugo-build-and-archive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Hugo Build and Archive

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.110.0"
extended: true

- name: Install Node.js Dependencies
run: npm install
working-directory: ${{ github.workspace }}

- name: Build Hugo Site
run: hugo --minify

# - name: Archive Public Folder
# run: |
# zip -r public.zip public
# working-directory: ${{ github.workspace }}

- name: Upload Archive
uses: actions/upload-artifact@v2
with:
name: public-archive
path: public

0 comments on commit 2236882

Please sign in to comment.