Skip to content
Snippets Groups Projects
Commit 9d79a333 authored by Moritz Stückler's avatar Moritz Stückler :cowboy:
Browse files

feat: add build script

parent a30ff741
No related branches found
No related tags found
1 merge request!149feat: add build script
Pipeline #8471 passed
.DS_Store
node_modules
dist
fcos-suite-astro-main
.astro
\ No newline at end of file
# fchh-website-content
This repository only contains the content (.mdx files for text content and images/other assets) for the website of the Fab City Hamburg e. V.
This repository only contains the content (.mdx files for text content and images/other assets) for the website of the Fab City Hamburg e. V. It does not contain a runnable website by default.
It is built upon the Astro template called [FCOS Suite](https://gitlab.fabcity.hamburg/fcos-suite/fcos-suite-astro).
## Build process
During the build pipeline, it pulls the latest Astro template from the `fcos-suite-astro` repo and then replaces the `public` and `src/pages` folders.
\ No newline at end of file
During the build pipeline, it pulls the latest Astro template from the `fcos-suite-astro` repo and then replaces the `public` and `src/pages` folders. You can do the same thing locally by running the `build.sh` script in the root folder.
1. Make sure you have `rsync` installed locally on your system
2. Run `build.sh`
3. Create a `.env` file (you can just duplicate the example file)
4. Run `npm install`
5. Run `npm run dev`
\ No newline at end of file
build.sh 0 → 100755
#!/bin/sh
# This script will populate the content repository with the actual Astro website/template, so it can be run/previewd locally.
TEMPLATE_DOWNLOAD_URL=https://gitlab.fabcity.hamburg/fcos-suite/fcos-suite-astro/-/archive/main/fcos-suite-astro-main.zip
TEMPLATE_FILENAME=template.zip
echo "Downloading Astro template from $TEMPLATE_DOWNLOAD_URL to $TEMPLATE_FILENAME"
curl --progress-bar $TEMPLATE_DOWNLOAD_URL -o $TEMPLATE_FILENAME
echo "Extracting $TEMPLATE_FILENAME"
unzip -q -o $TEMPLATE_FILENAME
echo "Deleting archive $TEMPLATE_FILENAME"
rm $TEMPLATE_FILENAME
echo "Copying template files into root folder"
# Copy all files from the template repo, except Content Markdown files (already in working dir)
rsync -va --exclude="src/pages/**/*.md" --exclude="src/pages/**/*.mdx" --exclude="src/content/**/*.md" --exclude="src/content/**/*.mdx" --exclude="public" --exclude ".git" fcos-suite-astro-main/ .
echo "Deleting template folder"
rm -rf fcos-suite-astro-main
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment