mirror of
https://github.com/offen/website.git
synced 2024-11-22 09:00:28 +01:00
add homepage to global setup
This commit is contained in:
parent
020ef4d134
commit
8ee84cf61a
@ -327,7 +327,6 @@ jobs:
|
|||||||
paths:
|
paths:
|
||||||
- ~/offen/packages/node_modules
|
- ~/offen/packages/node_modules
|
||||||
key: offen-packages-{{ checksum "package.json" }}
|
key: offen-packages-{{ checksum "package.json" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: offen-auditorium-{{ checksum "auditorium/package.json" }}
|
key: offen-auditorium-{{ checksum "auditorium/package.json" }}
|
||||||
- run:
|
- run:
|
||||||
@ -363,6 +362,56 @@ jobs:
|
|||||||
$(npm bin)/sls deploy --config vault/serverless.yml
|
$(npm bin)/sls deploy --config vault/serverless.yml
|
||||||
$(npm bin)/sls client deploy --config vault/serverless.yml --no-confirm
|
$(npm bin)/sls client deploy --config vault/serverless.yml --no-confirm
|
||||||
|
|
||||||
|
deploy_homepage:
|
||||||
|
docker:
|
||||||
|
- image: circleci/python:3.6
|
||||||
|
working_directory: ~/offen/homepage
|
||||||
|
environment:
|
||||||
|
- SOURCE_BRANCH: master
|
||||||
|
- TARGET_BRANCH: gh-pages
|
||||||
|
steps:
|
||||||
|
- checkout:
|
||||||
|
path: ~/offen
|
||||||
|
- restore_cache:
|
||||||
|
key: offen-homepage-{{ checksum "requirements.txt" }}
|
||||||
|
- run:
|
||||||
|
name: Install dependencies
|
||||||
|
command: |
|
||||||
|
python -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
pip install -r requirements.txt
|
||||||
|
- save_cache:
|
||||||
|
paths:
|
||||||
|
- ~/offen/homepage/venv
|
||||||
|
key: offen-homepage-{{ checksum "requirements.txt" }}
|
||||||
|
- run:
|
||||||
|
name: Deploy
|
||||||
|
command: |
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
git config --global user.email $GH_EMAIL
|
||||||
|
git config --global user.name $GH_NAME
|
||||||
|
|
||||||
|
git clone $CIRCLE_REPOSITORY_URL out
|
||||||
|
|
||||||
|
cd out
|
||||||
|
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
|
||||||
|
git rm -rf .
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
make publish
|
||||||
|
|
||||||
|
cp -a output/. out/.
|
||||||
|
|
||||||
|
mkdir -p out/.circleci && cp -a .circleci/. out/.circleci/.
|
||||||
|
cp CNAME out/CNAME
|
||||||
|
cd out
|
||||||
|
|
||||||
|
git add -A
|
||||||
|
git commit -m "Automated deployment to GitHub Pages: ${CIRCLE_SHA1}" --allow-empty
|
||||||
|
|
||||||
|
git push origin $TARGET_BRANCH
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
test_build_deploy:
|
test_build_deploy:
|
||||||
@ -381,3 +430,5 @@ workflows:
|
|||||||
<<: *deploy_preconditions
|
<<: *deploy_preconditions
|
||||||
- deploy_python:
|
- deploy_python:
|
||||||
<<: *deploy_preconditions
|
<<: *deploy_preconditions
|
||||||
|
- deploy_homepage:
|
||||||
|
<<: *deploy_preconditions
|
||||||
|
1
Makefile
1
Makefile
@ -13,6 +13,7 @@ setup:
|
|||||||
@docker-compose run server go mod download
|
@docker-compose run server go mod download
|
||||||
@docker-compose run kms go mod download
|
@docker-compose run kms go mod download
|
||||||
@docker-compose run accounts pip install --user -r requirements.txt -r requirements-dev.txt
|
@docker-compose run accounts pip install --user -r requirements.txt -r requirements-dev.txt
|
||||||
|
@docker-compose run homepage pip install --user -r requirements.txt
|
||||||
@echo "Successfully built containers and installed dependencies."
|
@echo "Successfully built containers and installed dependencies."
|
||||||
@echo "If this is your initial setup, you can run 'make bootstrap' next"
|
@echo "If this is your initial setup, you can run 'make bootstrap' next"
|
||||||
@echo "to create the needed local keys and seed the database."
|
@echo "to create the needed local keys and seed the database."
|
||||||
|
@ -126,6 +126,18 @@ services:
|
|||||||
SERVER_HOST: http://server:8080
|
SERVER_HOST: http://server:8080
|
||||||
SESSION_SECRET: vndJRFJTiyjfgtTF
|
SESSION_SECRET: vndJRFJTiyjfgtTF
|
||||||
|
|
||||||
|
homepage:
|
||||||
|
build:
|
||||||
|
context: '.'
|
||||||
|
dockerfile: Dockerfile.python
|
||||||
|
working_dir: /offen/homepage
|
||||||
|
volumes:
|
||||||
|
- .:/offen
|
||||||
|
- homepagedeps:/root/.local
|
||||||
|
command: make devserver
|
||||||
|
ports:
|
||||||
|
- 8000:8000
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
kmsdeps:
|
kmsdeps:
|
||||||
serverdeps:
|
serverdeps:
|
||||||
@ -133,3 +145,4 @@ volumes:
|
|||||||
auditoriumdeps:
|
auditoriumdeps:
|
||||||
vaultdeps:
|
vaultdeps:
|
||||||
accountdeps:
|
accountdeps:
|
||||||
|
homepagedeps:
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
version: 2
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
branches:
|
|
||||||
ignore:
|
|
||||||
- gh-pages
|
|
||||||
docker:
|
|
||||||
- image: circleci/python:3.6
|
|
||||||
working_directory: ~/repo
|
|
||||||
environment:
|
|
||||||
- SOURCE_BRANCH: master
|
|
||||||
- TARGET_BRANCH: gh-pages
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- deploy:
|
|
||||||
name: Deploy
|
|
||||||
command: |
|
|
||||||
if [ $CIRCLE_BRANCH == $SOURCE_BRANCH ]; then
|
|
||||||
python -m venv venv
|
|
||||||
source venv/bin/activate
|
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
git config --global user.email $GH_EMAIL
|
|
||||||
git config --global user.name $GH_NAME
|
|
||||||
|
|
||||||
git clone $CIRCLE_REPOSITORY_URL out
|
|
||||||
|
|
||||||
cd out
|
|
||||||
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
|
|
||||||
git rm -rf .
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
make publish
|
|
||||||
|
|
||||||
cp -a output/. out/.
|
|
||||||
|
|
||||||
mkdir -p out/.circleci && cp -a .circleci/. out/.circleci/.
|
|
||||||
cp CNAME out/CNAME
|
|
||||||
cd out
|
|
||||||
|
|
||||||
git add -A
|
|
||||||
git commit -m "Automated deployment to GitHub Pages: ${CIRCLE_SHA1}" --allow-empty
|
|
||||||
|
|
||||||
git push origin $TARGET_BRANCH
|
|
||||||
fi
|
|
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2019 offen
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
Loading…
Reference in New Issue
Block a user