-
Notifications
You must be signed in to change notification settings - Fork 15
55 lines (45 loc) · 1.43 KB
/
publish-tests.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
name: Publish Tests
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write # Required for pushing to gh-pages
pages: write # Required for deploying to Pages
id-token: write # Required for deploying to Pages
steps:
- name: Checkout current repository
uses: actions/checkout@v4
with:
path: "current-repo"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Clone editor-online-preview repository
run: |
git clone https://github.com/lvgl-private/editor-test-preview.git /tmp/editor-preview
- name: Prepare preview files
run: |
# Create project directory in the preview
mkdir -p /tmp/editor-preview/project
# Copy current repo contents to project directory
cp -r current-repo/* /tmp/editor-preview/project/
- name: Generate manifest file
run: |
cd /tmp/editor-preview
node generateProjectManifest.js ./project/ "project/"
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: /tmp/editor-preview
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
path: /tmp/editor-preview