diff --git a/.github/main.workflow b/.github/main.workflow new file mode 100644 index 0000000..c03be47 --- /dev/null +++ b/.github/main.workflow @@ -0,0 +1,9 @@ +workflow "Main workflow" { + on = "push" + resolves = ["docker-build"] +} + +action "docker-build" { + uses = "actions/docker/cli@master" + args = "build -t peaceiris/actions-hugo ." +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f37cf10 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM debian:9-slim + +LABEL "com.github.actions.name"="Hugo extended action" +LABEL "com.github.actions.description"="GitHub Actions for Hugo extended version" +LABEL "com.github.actions.icon"="package" +LABEL "com.github.actions.color"="yellow" + +LABEL "repository"="https://github.com/peaceiris/actions-hugo" +LABEL "homepage"="https://github.com/peaceiris/actions-hugo" +LABEL "maintainer"="peaceiris" + +ENV HUGO_VERSION='0.55.6' +ENV HUGO_NAME="hugo_extended_${HUGO_VERSION}_Linux-64bit" +ENV HUGO_URL="https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_NAME}.deb" +ENV BUILD_DEPS="wget" + +RUN apt-get update && apt-get upgrade -y && \ + apt-get install -y "${BUILD_DEPS}" && \ + wget "${HUGO_URL}" && \ + apt-get install "./${HUGO_NAME}.deb" && \ + rm -rf "./${HUGO_NAME}.deb" "${HUGO_NAME}" && \ + apt-get remove -y "${BUILD_DEPS}" && \ + apt-get autoremove && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +ENTRYPOINT [ "/usr/local/bin/hugo" ] diff --git a/LICENSE b/LICENSE index 82bff43..11c0769 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Shohei Ueda +Copyright (c) 2019 Shohei Ueda (peaceiris) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 32c852a..4ed65c4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,45 @@ -# actions-hugo -GitHub Actions for Hugo +[![license](https://img.shields.io/github/license/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE) +[![release](https://img.shields.io/github/release/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases/latest) +[![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases) + +GitHub Actions for Hugo + + + +## GitHub Actions for Hugo + +- [gohugoio/hugo: The world’s fastest framework for building websites.](https://github.com/gohugoio/hugo) + +This action runs the following commands. + + + +## Getting started + +### Create `main.workflow` + +```hcl +workflow "Main workflow" { + on = "push" + resolves = ["hugo"] +} + +action "hugo" { + uses = "peaceiris/actions-hugo@v0.55.6" + args = ["--gc", "--minify", "--cleanDestinationDir"] +} +``` + + + +## License + +[MIT License - peaceiris/actions-hugo] + +[MIT License - peaceiris/actions-hugo]: https://github.com/peaceiris/actions-hugo/blob/master/LICENSE + + + +## Supprt author + +peaceiris - Patreon diff --git a/images/ogp.svg b/images/ogp.svg new file mode 100644 index 0000000..61d1d86 --- /dev/null +++ b/images/ogp.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/patreon.jpg b/images/patreon.jpg new file mode 100644 index 0000000..1c68052 Binary files /dev/null and b/images/patreon.jpg differ