Skip to content

Commit e8ab04f

Browse files
committed
build: Site is now built, not just static
1 parent 7fcf4f7 commit e8ab04f

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ jobs:
3333

3434
- name: Checkout
3535
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
36+
- name: Build
37+
run: ./build.sh
3638
- name: Setup Pages
3739
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382 # v3.0.6
3840
- name: Upload artifact
3941
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2.0.0
4042
with:
41-
path: site/
43+
path: BUILT/site/
4244
- name: Deploy to GitHub Pages
4345
id: deployment
4446
uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5 # v2.0.4

.github/workflows/preview.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ jobs:
3333

3434
- name: Build
3535
if: ${{ github.event.action != 'closed' }} # Skipping these steps if the PR has been closed
36-
# run: ./build.sh
37-
run: echo "Hi! Buidling..."
36+
run: ./build.sh
3837

3938
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
4039
id: changes
@@ -49,7 +48,7 @@ jobs:
4948
# TODO Re-check if https://github.com/actions/deploy-pages#inputs- support of "preview" is no longer "only in alpha currently and is not available to the public"
5049
uses: rossjrw/pr-preview-action@183082fd714654433c8e2f6daedbfb4f20f2a94a # v1.4.4
5150
with:
52-
source-dir: ./site/
51+
source-dir: BUILT/site/
5352
# https://github.com/www-learn-study/previews
5453
deploy-repository: www-learn-study/previews
5554
# custom-url: https://www-learn-study.github.io/previews

build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
set -euxo pipefail
3+
4+
# TODO Use Makefile? https://bob.build? https://magefile.org? Build lessons! ;)
5+
6+
mkdir -p BUILT/site/
7+
8+
# TODO Rename site/ to static/
9+
find site/ -type f -exec ln -f {} BUILT/site \;

0 commit comments

Comments
 (0)