forked from alex-shpak/hugo-book
-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (31 loc) · 880 Bytes
/
main.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
on:
repository_dispatch:
types:
- update
schedule:
- cron: '0 2 * * *'
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set Node.js 20.x
uses: actions/setup-node@master
with:
node-version: 20.x
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Build production bundle
uses: borales/actions-yarn@v4
with:
cmd: prod # will run `yarn prod` command
- name: Deploy to Netlify
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
build_directory: dist
with:
args: deploy --prod