Skip to content

Commit 9962126

Browse files
committed
Render workflow
1 parent 5a6d021 commit 9962126

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/pollen.render.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Pollen - Render website
2+
3+
on:
4+
workflow_run:
5+
workflows: ['Pollen.jl build - dev', 'Pollen.jl build - PR preview', 'Pollen.jl build - Release']
6+
types:
7+
- completed
8+
workflow_dispatch:
9+
10+
# TODO: add concurrency limit
11+
jobs:
12+
pollen:
13+
name: "Pollen - Prerender static frontend and deploy"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
ref: pollen
19+
path: data
20+
- uses: actions/checkout@v2
21+
with:
22+
ref: "gh-pages"
23+
path: pages
24+
- uses: actions/checkout@v2
25+
with:
26+
repository: lorenzoh/pollenjl-frontend
27+
path: frontend
28+
ref: main
29+
- name: Move Pollen data to static folder
30+
run: |
31+
ls
32+
rm -rf data/.git
33+
cp -r data/ frontend/static/
34+
- uses: actions/setup-node@v2
35+
- name: Install dependencies
36+
run: |
37+
cd frontend
38+
npm install
39+
- name: Build
40+
run: |
41+
cd frontend
42+
npm run build
43+
- name: Deploy changes
44+
run: |
45+
ls -lt
46+
rm -r frontend/build/data
47+
cp -r frontend/build/** pages
48+
cp -r data pages/
49+
cd pages
50+
git config user.name github-actions
51+
git config user.email [email protected]
52+
git add -f .
53+
git commit -m "Deploy documentation (Pollen.jl)"
54+
git push

0 commit comments

Comments
 (0)