-
Notifications
You must be signed in to change notification settings - Fork 28
45 lines (43 loc) · 1.26 KB
/
site-refresh.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
name: Refresh site
on:
repository_dispatch:
schedule:
- cron: '*/15 7-23 * * *'
jobs:
refresh:
name: Refresh site
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Set up Node 16.x
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Cache node_modules
uses: actions/cache@v1
id: cache-node_modules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- name: Set up dependencies
if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' }}
run: yarn install
- name: Build site
run: yarn run build
env:
NODE_ENV: production
- name: Publish site
uses: JamesIves/[email protected]
id: publish
with:
branch: gh-pages
folder: dist
git-config-name: vlctechhub[bot]
git-config-email: [email protected]
single-commit: true
- name: Report published items
if: ${{ steps.publish.outputs.deployment-status == 'success' }}
run: yarn run report-published
env:
NODE_ENV: production