From 30825ba0e6085838218b7c5695e4cbe61a8a57fc Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 10 Apr 2020 12:56:18 +0100 Subject: [PATCH] Add CI config for GitHub actions --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..58344ca --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v1 + with: + submodules: true + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: '0.68.3' + extended: true + + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: '10.x' + + - uses: actions/cache@v1 + with: + path: $HOME/.npm + key: npm-${{ hashFiles('package-lock.json') }} + + - name: Install Dependencies + run: npm ci + + - name: Build site + run: ./scripts/release.sh + + - name: Run tests + run: ./scripts/test.sh diff --git a/README.md b/README.md index ab68652..06ce146 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,6 @@ [![Circle CI](https://circleci.com/gh/RealOrangeOne/theorangeone.net.svg?style=svg)](https://circleci.com/gh/RealOrangeOne/theorangeone.net) ![Deploy](https://github.com/RealOrangeOne/theorangeone.net/workflows/Deploy/badge.svg) +![CI](https://github.com/RealOrangeOne/theorangeone.net/workflows/CI/badge.svg) https://theorangeone.net