Merge pull request #4 from maikka39/feature/ci

Add automatic deployment
alternate-navbar
Maik de Kruif 4 years ago committed by GitHub
commit a3321be74d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 34
      .github/workflows/hugo_cd.yml
  2. 15
      .github/workflows/hugo_ci.yml

@ -0,0 +1,34 @@
name: Hugo CD
on:
push:
branches:
- "master"
defaults:
run:
working-directory: ./
jobs:
cd:
timeout-minutes: 6
name: CD
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Build
run: hugo -D -F
- name: Create GitHub deployment
uses: chrnorm/deployment-action@releases/v1
id: deployment
with:
token: "${{ github.token }}"
target_url: https://maik.dev/
environment: production
initial_status: "success"

@ -2,18 +2,23 @@ name: Hugo CI
on:
push:
branches: ["**"]
branches:
- "*"
- "*/*"
- "**"
- "!master"
pull_request:
branches: [master]
branches:
- "master"
defaults:
run:
working-directory: ./
jobs:
compile:
timeout-minutes: 10
name: Compile
ci:
timeout-minutes: 5
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout code

Loading…
Cancel
Save