Skip to content

Commit

Permalink
Deploy using GitHub actions (#131)
Browse files Browse the repository at this point in the history
* github actions: only run on merge into master
* github actions: build PR using hugo
  • Loading branch information
gwarf authored Nov 5, 2020
1 parent f8dc5a0 commit d1173ee
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 9 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Build documentation
# Setup and build files with hugo
# https://github.com/peaceiris/actions-hugo
# Deploy to GitHub pages
# https://github.com/peaceiris/actions-gh-pages

on: [push, pull_request]

jobs:
deploy:
name: Build with Hugo
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
# Fetch the Docsy theme
submodules: recursive
# Fetch all history for .GitInfo and .Lastmod
fetch-depth: 0

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.66.0"
extended: true

- name: Setup Node
uses: actions/setup-node@v1
with:
# NodeJS 12 is maintained until 2022-04-30
node-version: "12.x"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm project with a clean slate
run: npm ci

- name: Build and minify using Hugo
run: hugo --minify
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check Markdown links
name: Check links

on: [push, pull_request]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
---
name: github pages
name: Deploy to GitHub pages
# Setup and build files with hugo
# https://github.com/peaceiris/actions-hugo
# Deploy to GitHub pages
# https://github.com/peaceiris/actions-gh-pages

# XXX temporary for testing build in the PR
on: [push, pull_request]
# XXX to be used once confiremd it builds correctly
# on:
# push:
# branches:
# - master
on:
push:
branches:
- master

jobs:
deploy:
Expand Down
File renamed without changes.

0 comments on commit d1173ee

Please sign in to comment.