-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (38 loc) · 1 KB
/
gh-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Fetch dependencies'
uses: bahmutov/npm-install@v1
- name: 'Move dependencies'
run: yarn build
- name: 'Build only'
uses: shalzz/zola-deploy-action@master
env:
BUILD_DIR: .
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_ONLY: true
build_and_deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Fetch dependencies'
uses: bahmutov/npm-install@v1
- name: 'Move dependencies'
run: yarn build
- name: 'Build and deploy'
uses: shalzz/zola-deploy-action@master
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: .
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}