Skip to content

Commit 7dfbaa5

Browse files
authored
Fix deploy website (#30)
* Add quarto render to website deploy * Add docker login * Update ci name * Add allowed host
1 parent 88ebb4c commit 7dfbaa5

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/workflows/deploy_apps.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Deploy apps
22
on:
33
push:
44
branches:
@@ -27,8 +27,19 @@ jobs:
2727
- name: Deploy website
2828
run: |
2929
ssh app sh <<EOF
30+
3031
cd FAIRSenDD
31-
git pull
32+
git fetch
33+
git checkout ${{ github.sha }}
34+
3235
cd website
33-
sh run.sh
36+
# render needs to be outside of docker build because docker is called itself
37+
rm -rf content/out.zarr || :
38+
ls content/*.qmd | xargs -i -P 4 quarto render {}
39+
40+
cd ../infrastructure/app
41+
echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username ${{ vars.DOCKER_USERNAME }} --password-stdin
42+
docker compose build
43+
docker compose push
44+
docker compose up --detach
3445
EOF

website/content/.vitepress/config.mts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ export default defineConfig({
107107
},
108108
},
109109
},
110+
vite: {
111+
server: {
112+
allowedHosts: [
113+
'fairsendd.eodchosting.eu',
114+
],
115+
}
116+
},
110117
themeConfig: {
111118
// https://vitepress.dev/reference/default-theme-config
112119

@@ -141,5 +148,5 @@ export default defineConfig({
141148
`,
142149
copyright: `© Copyright ${new Date().getUTCFullYear()}.`
143150
},
144-
}
151+
},
145152
})

0 commit comments

Comments
 (0)