forked from doka-guide/content
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.37 KB
/
social-cards.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
name: Social Cards
on:
workflow_dispatch:
schedule:
- cron: '30 6 * * 5'
jobs:
social-cards:
runs-on: ubuntu-latest
steps:
- name: Загрузка platform
uses: actions/checkout@v4
with:
repository: doka-guide/platform
- name: Загрузка контента
uses: actions/checkout@v4
with:
path: content
- name: Кэширование модулей
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Установка модулей
run: npm ci
- name: Сборка сайта
run: |
node make-links.js --default
npm run preview
- name: Генерация карточек
run: npx gulp socialCards
- name: Кэширование артефакта сборки
uses: actions/upload-artifact@v2
with:
name: doka-guide-content-social-cards
retention-days: 8
path: |
dist/**/**/images/covers/og.png
dist/**/**/images/covers/twitter.png