Skip to content

Commit

Permalink
build: Site is now built, not just static
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Nov 2, 2023
1 parent 7fcf4f7 commit e8ab04f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ jobs:

- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build
run: ./build.sh
- name: Setup Pages
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382 # v3.0.6
- name: Upload artifact
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2.0.0
with:
path: site/
path: BUILT/site/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5 # v2.0.4
5 changes: 2 additions & 3 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:

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

- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
Expand All @@ -49,7 +48,7 @@ jobs:
# 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"
uses: rossjrw/pr-preview-action@183082fd714654433c8e2f6daedbfb4f20f2a94a # v1.4.4
with:
source-dir: ./site/
source-dir: BUILT/site/
# https://github.com/www-learn-study/previews
deploy-repository: www-learn-study/previews
# custom-url: https://www-learn-study.github.io/previews
Expand Down
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euxo pipefail

# TODO Use Makefile? https://bob.build? https://magefile.org? Build lessons! ;)

mkdir -p BUILT/site/

# TODO Rename site/ to static/
find site/ -type f -exec ln -f {} BUILT/site \;

0 comments on commit e8ab04f

Please sign in to comment.