1
mirror of https://github.com/jakejarvis/hugo-mod-twemoji.git synced 2025-06-27 10:55:41 -04:00
Files
hugo-mod-twemoji/.github/workflows/ci.yml

58 lines
2.1 KiB
YAML

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.83.1
HUGO_EXTENDED: true
steps:
- name: Checkout local copy of module
uses: actions/checkout@v2
with:
path: module
fetch-depth: 1
- name: Install Go 1.13.x
uses: actions/setup-go@v2
with:
go-version: 1.13.x
- name: Install Hugo
run: |
wget --no-verbose https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_EXTENDED:+extended_}${HUGO_VERSION}_Linux-64bit.tar.gz
wget --no-verbose https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_checksums.txt
grep hugo_${HUGO_EXTENDED:+extended_}${HUGO_VERSION}_Linux-64bit.tar.gz hugo_${HUGO_VERSION}_checksums.txt | sha256sum -c
tar xf hugo_${HUGO_EXTENDED:+extended_}${HUGO_VERSION}_Linux-64bit.tar.gz
chmod +x ./hugo
./hugo version
- name: Checkout gohugoio/hugoBasicExample
uses: actions/checkout@v2
with:
repository: gohugoio/hugoBasicExample
ref: 00188bc80985f84f6ee85e41f533dd4a19cae169
path: example
fetch-depth: 1
- name: Install local module & add to config.toml
run: |
cd example
$GITHUB_WORKSPACE/hugo mod init github.com/gohugoio/hugoBasicExample
$GITHUB_WORKSPACE/hugo mod get github.com/jakejarvis/hugo-mod-twemoji
echo -e "[[module.imports]]\n path = \"github.com/jakejarvis/hugo-mod-twemoji\"" >> config.toml
echo "replace github.com/jakejarvis/hugo-mod-twemoji => /home/runner/work/hugo-mod-twemoji/hugo-mod-twemoji/module" >> go.mod
$GITHUB_WORKSPACE/hugo mod get -u ./...
$GITHUB_WORKSPACE/hugo mod graph
- name: Build site
run: |
./hugo --source example/ --verbose
- name: Are 🌈s imaginary??? (png)
run: |
test -f ./example/public/twemoji/png/1f308.png
- name: Does true 💓 even exist?!?!??! (svg)
run: |
test -f ./example/public/twemoji/svg/1f493.svg