Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
This repository was archived by the owner on Dec 2, 2025. It is now read-only.

Deploying automatically to our production website #5

@jurra

Description

@jurra

Continuous integration and deployment works fine in the ohlwebsite.
Andre and I found an issue with regard to the domain name itself. I can recall the details but I think is in an older issue.

The current solution

Commit changes and automatically push to the current production website.

Setup this following these steps:

  1. Go to .git\hooks folder in your local ohlwebsite repository. Make sure to unhide these folder if is hidden.
  2. Go to post-commit file and replace its current code with the following code:
#!/bin/sh

# abort on errors
# set -e

# load .env
# eval "$(cat .env <(echo) <(declare -x))"

# build
npm run build

# navigate into the build output directory
cd dist

# if you are deploying to a custom domain
# echo 'www.example.com' > CNAME

git init

echo "openhardware4.me" > CNAME

git add -A
git commit -m 'deploy'

git push -f https://github.com/Open-Hardware-Leaders/open-hardware-leaders.github.io.git master

cd -

git push origin
  1. (Recommended but not compulsory for now) Test your change also locally running npm start.
  2. Make your commits normally and the production repo will be updated automatically.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions