add: action
This commit is contained in:
parent
bb881b84c6
commit
292438bb12
6 changed files with 114 additions and 3 deletions
9
.github/main.workflow
vendored
Normal file
9
.github/main.workflow
vendored
Normal file
|
@ -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 ."
|
||||
}
|
27
Dockerfile
Normal file
27
Dockerfile
Normal file
|
@ -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" ]
|
2
LICENSE
2
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
|
||||
|
|
47
README.md
47
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)
|
||||
|
||||
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
|
||||
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
<a href="https://www.patreon.com/peaceiris"><img src="./images/patreon.jpg" alt="peaceiris - Patreon" width="150px"></a>
|
||||
|
|
32
images/ogp.svg
Normal file
32
images/ogp.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 258 KiB |
BIN
images/patreon.jpg
Normal file
BIN
images/patreon.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Loading…
Reference in a new issue