Skip to content

Commit a701cb6

Browse files
committed
Do it out of public
1 parent 68fbb7a commit a701cb6

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/deploy.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ jobs:
3030
node-version: "16"
3131
- name: Install dependencies
3232
run: npm ci
33+
- run: mkdir -p public
3334
- name: Generate bundled files
3435
run: npm run build
3536
- name: Move static assets
36-
run: npm run publish
37+
run: npm run static
3738
- name: Generate the index file
3839
run: |
3940
npm run svg
4041
node ./src/functions/ssr.js
41-
- name: Deploy to GitHub Pages
42-
uses: actions/deploy-pages@v1
42+
- name: Deploy 🚀
43+
uses: JamesIves/github-pages-deploy-action@v4
44+
with:
45+
folder: public # The folder the action should deploy.

src/functions/ssr.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ async function preview() {
3232

3333
const rendered = template.replace("{{HTML}}", await renderHTML());
3434

35-
return fs.writeFile(path.resolve(__dirname, "../../index.html"), rendered, "utf-8");
35+
return fs.writeFile(
36+
path.resolve(__dirname, "../../public/index.html"),
37+
rendered,
38+
"utf-8"
39+
);
3640
}
3741

3842
if (require.main === module) {

0 commit comments

Comments
 (0)