Commit 80512ed8 authored by yova's avatar yova 💫

document CI/CD pipeline

deprecate deploy script
parent 20389b17
Pipeline #245 waiting for manual action with stages
in 4 minutes and 30 seconds
......@@ -4,22 +4,29 @@ This is the source code for [`solidbase.info`](https://solidbase.info).
## Dependencies
- Hugo Extended
i.e. as a Snap package https://gohugo.io/getting-started/installing/#linux
- Node.js, ideally via nvm.sh
- [Hugo](https://gohugo.io/getting-started/installing/)
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
## Submodules
## Run locally
```
git clone git@lab.allmende.io:solidbase/learn.git
cd learn
git submodule sync
git submodule update --init --recursive --remote
hugo serve
```
## Deployment
```
./deploy
```
This repo uses [gitlab CI/CD](https://docs.gitlab.com/ce/ci/#exploring-gitlab-ci-cd) for deployment to [dokku](http://dokku.viewdocs.io/dokku/). See the [pipeline configuration](https://lab.allmende.io/solidbase/website/blob/master/.gitlab-ci.yml) for details.
The following Variables needs to be set as under `Settings->CI/CD->Variables`:
- `APP_NAME_DEV`: The SLD name for the *staging instance*, which will become accessible under `$APP_NAME_DEV.dokku.ecobytes.net`
- `APP_NAME`: A fqdn for the *production instance*
- `SSH_PRIVATE_KEY`: A key for the dokku, defined as project wide variable
Deployment to *production* needs to be maually triggered in the pipeline view.
## Authors
......@@ -28,4 +35,4 @@ git submodule update --init --recursive --remote
## License
CC0
[GPL3](LICENSE)
#!/bin/bash
echo -e "\033[0;32mDeploying updates to GitLab and Dokku...\033[0m"
# Commit changes.
msg="rebuilding site `date`"
if [ $# -eq 1 ]
then msg="$1"
fi
git add .
git commit -m "pre $msg"
# Build the project.
cd public && git checkout master && cd -
rm -rf public/*
hugo # if using a theme, replace with `hugo -t <YOURTHEME>`
# Go To Public folder
cd public
# Add changes to git.
git add .
git commit -m "$msg"
# Push built repo.
git push
# Come Back up to the Project Root
cd ..
git add .
git commit -m "post $msg"
git push
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment