Skip to content

Instantly share code, notes, and snippets.

@ysyukr
Created January 17, 2020 16:29
Show Gist options
  • Save ysyukr/f337842b91e9c353b1344e4d02cf8359 to your computer and use it in GitHub Desktop.
Save ysyukr/f337842b91e9c353b1344e4d02cf8359 to your computer and use it in GitHub Desktop.
Publish Static Web App(Hugo) to Netlify @v1
name: Publish Static Web App(Hugo) to Netlify
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v1
- name: Checkout Submodule repo
shell: bash
run: |
git clone https://github.com/xiaoheiAh/hugo-theme-pure.git themes/pure
- name: Install netlify CLI
shell: bash
run: |
sudo npm install -g netlify-cli
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build Site
shell: bash
run: |
hugo --minify
- name: Deploy
shell: bash
run: |
netlify deploy -d ./public -p -s ${{ secrets.NETLIFY_SITE_ID }} -a ${{ secrets.NETLIFY_AUTH_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment