mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-23 08:36:30 -05:00
Prebuild script
This commit is contained in:
parent
5025642c44
commit
1107a08a1c
2 changed files with 21 additions and 4 deletions
7
.github/workflows/deploy.yml
vendored
7
.github/workflows/deploy.yml
vendored
|
@ -44,15 +44,14 @@ jobs:
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y rustc cargo
|
sudo apt install -y rustc cargo
|
||||||
|
|
||||||
- name: Build
|
- name: Build Website-Toots
|
||||||
run: |
|
run: |
|
||||||
cd content/toots/.scripts
|
cd content/toots/.scripts
|
||||||
cargo build --release
|
cargo build --release
|
||||||
|
|
||||||
- name: Generate Hugo Markdown for Toots
|
- name: Pre-build script
|
||||||
run: |
|
run: |
|
||||||
cd content/toots/.scripts
|
./build.sh
|
||||||
./target/release/generate_md
|
|
||||||
|
|
||||||
- name: Build Hugo Website
|
- name: Build Hugo Website
|
||||||
id: build
|
id: build
|
||||||
|
|
18
build.sh
Normal file
18
build.sh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# Generate toot markdown files
|
||||||
|
|
||||||
|
pushd content/toots/.scripts > /dev/null
|
||||||
|
|
||||||
|
generate_exe="./target/release/generate_md"
|
||||||
|
|
||||||
|
# Check if the file exists and is executable
|
||||||
|
if [ -e "$generate_exe" ] && [ -x "$generate_exe" ]; then
|
||||||
|
echo "The file '$file_path' exists and is executable."
|
||||||
|
./target/release/generate_md
|
||||||
|
else
|
||||||
|
echo "The executable '$generate_exe' does not exist."
|
||||||
|
echo "Perhaps run cargo build in 'content/toots/.scripts'?"
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd > /dev/null
|
Loading…
Reference in a new issue