-
Notifications
You must be signed in to change notification settings - Fork 779
57 lines (46 loc) · 1.55 KB
/
lost-pixel.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: "Lost Pixel"
on: [push]
jobs:
build:
runs-on: ubuntu-latest
name: Lost Pixel
steps:
- uses: actions/checkout@v4
- name: Get all changed markdown files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: content/**/*.{md,mdx}
- name: Output relevant files
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.any_changed }}
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
if [ ${CHANGED_FILES} == 'true' ]; then
declare -a linksArray
linksArray=(`echo ${ALL_CHANGED_FILES}`)
for link in "${linksArray[@]}"; do
echo "$link"
done
else
echo "No files changed."
fi
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install deps
run: npm install
- name: Build docs
env:
DOCUSAURUS_POST_HOG_KEY: ${{ secrets.DOCUSAURUS_POST_HOG_KEY }}
run: npm run clean && npm run build
- name: Start docs
run: npm run serve &
- name: Generate sitemap
run: npx lost-pixel page-sitemap-gen http://172.17.0.1:3000/sitemap.xml "./lost-pixel-pages.json"
- name: Edit page names
run: sed -i -e 's/_/\//g' -e 's|prisma\.io||g' -re 's/(name.+)(\/)(\")/\1-\3/g' lost-pixel-pages.json
- name: Lost Pixel
uses: lost-pixel/lost-pixel@v3.21.0
env:
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }}