32 lines
745 B
YAML
32 lines
745 B
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: github.ref != 'refs/heads/master'
|
|
steps:
|
|
- name: 'Checkout'
|
|
uses: actions/checkout@master
|
|
- name: 'Build only'
|
|
uses: shalzz/zola-deploy-action@master
|
|
env:
|
|
BUILD_DIR: .
|
|
TOKEN: ${{ secrets.TOKEN }}
|
|
BUILD_ONLY: true
|
|
|
|
build_and_deploy:
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/master'
|
|
steps:
|
|
- name: 'Checkout'
|
|
uses: actions/checkout@master
|
|
- name: 'Build and deploy'
|
|
uses: shalzz/zola-deploy-action@master
|
|
env:
|
|
PAGES_BRANCH: gh-pages
|
|
BUILD_DIR: .
|
|
TOKEN: ${{ secrets.TOKEN }} |