Skip to content

Commit

Permalink
Merge pull request #3 from lowply/v2
Browse files Browse the repository at this point in the history
v2
  • Loading branch information
lowply authored Sep 19, 2019
2 parents e279b96 + f19989b commit 7a039ef
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
17 changes: 4 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
FROM debian:9-slim

LABEL "com.github.actions.name"="Build Hugo"
LABEL "com.github.actions.description"="Build Hugo"
LABEL "com.github.actions.icon"="code"
LABEL "com.github.actions.color"="purple"
LABEL "repository"="https://github.com/lowply/build-hugo"
LABEL "homepage"="https://github.com/lowply"
LABEL "maintainer"="Sho Mizutani <[email protected]>"

FROM debian:buster-slim
RUN apt-get update -y && apt-get install ca-certificates -y
RUN update-ca-certificates

ADD https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_extended_0.55.6_Linux-64bit.deb /usr/local/src
RUN dpkg -i /usr/local/src/hugo_extended_0.55.6_Linux-64bit.deb
ADD https://github.com/gohugoio/hugo/releases/download/v0.58.2/hugo_extended_0.58.2_Linux-64bit.deb /tmp
RUN dpkg -i /tmp/hugo_extended_0.58.2_Linux-64bit.deb
ENTRYPOINT hugo
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@

A GitHub Action to build Hugo site.

- Using [Hugo extended version 0.55.6](https://github.com/gohugoio/hugo/releases/tag/v0.55.6)
- Using [debian:9-slim](https://hub.docker.com/_/debian/) for the base image
- Using [Hugo extended version 0.58.2](https://github.com/gohugoio/hugo/releases/tag/v0.58.2)
- Using [debian:buster-slim](https://hub.docker.com/_/debian/) as the base image

Example workflow

```
workflow "Build" {
on = "push"
resolves = ["Build Hugo"]
}
action "Build Hugo" {
uses = "lowply/build-hugo@master"
runs = "hugo"
}
name: Build Hugo
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Build Hugo
uses: lowply/[email protected]
```
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'Build Hugo'
author: 'Sho Mizutani <[email protected]>'
description: 'Run the hugo command to build a website'
runs:
using: 'docker'
image: 'Dockerfile'
branding:
icon: 'code'
color: 'purple'

0 comments on commit 7a039ef

Please sign in to comment.