Skip to content

Commit

Permalink
docs: Add new section for google/docsy
Browse files Browse the repository at this point in the history
An example workflow for autoprefixer, postcss-cli,
and a Hugo theme which has recursive Git submodules

#340
google/docsy-example#60
  • Loading branch information
peaceiris committed May 24, 2020
1 parent 8f166cf commit e3045c5
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Setup Hugo
Expand Down Expand Up @@ -192,6 +192,60 @@ The alpine base Hugo Docker image is provided on the following repository.

> [peaceiris/hugo-extended-docker: Hugo alpine base Docker image (Hugo extended and Hugo Modules)](https://github.com/peaceiris/hugo-extended-docker)
### ⭐️ Workflow for autoprefixer and postcss-cli

Here is an example workflow for the [google/docsy] Hugo theme.
This theme needs `autoprefixer` and `postcss-cli` to build a project.
The following workflow is tested on [google/docsy-example].

[google/docsy]: https://github.com/google/docsy
[google/docsy-example]: https://github.com/google/docsy-example

```yaml
name: github pages

on:
push:
branches:
- master

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

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

- name: Setup Node
uses: actions/setup-node@v1
with:
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-
- run: npm ci
- run: hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
```

<div align="right">
<a href="#table-of-contents">Back to TOC ☝️</a>
</div>
Expand Down

0 comments on commit e3045c5

Please sign in to comment.