generated from themefisher/educenter-hugo
-
Notifications
You must be signed in to change notification settings - Fork 11
57 lines (49 loc) · 1.7 KB
/
publish.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Page Publish
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- uses: actions/setup-node@v1
with:
node-version: "12.x"
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cache node modules
id: cache-deps
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: "./node_modules"
key: ${{ runner.os }}-node_modules_cache-${{ hashFiles('./yarn.lock') }}
- run: yarn install --frozen-lockfile --non-interactive --ignore-optional
if: steps.cache-deps.outputs.cache-hit != 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: yarn build
env:
HUGO_PARAMS_SUBSCRIPTION_mailchimpuser: ${{ secrets.HUGO_PARAMS_MAILCHIMP_U }}
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dist # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch
- name: Notify deployment
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
message:
Blog je ažuriran. [Vidi promjene](https://github.com/UBIKhr/web/commit/${{ github.sha }}).