Skip to content

Commit

Permalink
chore: add workflow for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
smlx committed Aug 21, 2021
1 parent 5698308 commit 9af1867
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/github-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: github pages

on:
push:
branches:
- main # Set a branch to deploy
pull_request:

jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- uses: actions/checkout@v2
with:
repository: google/docsy
path: docs/themes/docsy
submodules: true

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

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'

- run: cd docs && npm install postcss postcss-cli autoprefixer

- run: cd docs && hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/public

0 comments on commit 9af1867

Please sign in to comment.