mirror of
https://github.com/offen/website.git
synced 2024-11-23 09:20:33 +01:00
commit
dde6cb0e6c
@ -20,11 +20,13 @@ jobs:
|
||||
export BUCKET="offen-dev-production"
|
||||
export DISTRIBUTION="E2UP8XHLFOC3QC"
|
||||
export ROBOTS_FILE="robots.txt.production"
|
||||
export OFFEN_ACCOUNT_ID="5ec8345a-2a45-4eb9-92e5-8d9e5684db58"
|
||||
else
|
||||
export SITEURL="https://staging.offen.dev"
|
||||
export BUCKET="offen-dev-staging"
|
||||
export DISTRIBUTION="E13I20LK8ASYFH"
|
||||
export ROBOTS_FILE="robots.txt.staging"
|
||||
export OFFEN_ACCOUNT_ID="8f7ee44a-4cd8-47f2-a77e-8c7c98d46b89"
|
||||
fi
|
||||
make build
|
||||
aws s3 sync --delete ./output/. s3://$BUCKET
|
||||
|
2
Makefile
2
Makefile
@ -23,7 +23,7 @@ ROBOTS_FILE ?= robots.txt.staging
|
||||
SITEURL ?= http://localhost:8000
|
||||
|
||||
build:
|
||||
@docker build --build-arg siteurl=${SITEURL} -t offen/website -f build/Dockerfile .
|
||||
@docker build --build-arg siteurl=${SITEURL} --build-arg offenaccountid=${OFFEN_ACCOUNT_ID} -t offen/website -f build/Dockerfile .
|
||||
@rm -rf output && mkdir output
|
||||
@docker create --entrypoint=bash -it --name assets offen/website
|
||||
@docker cp assets:/code/homepage/output/. ./output/
|
||||
|
@ -5,6 +5,8 @@ ENV NODE_PATH="/usr/lib/node_modules"
|
||||
|
||||
ARG siteurl
|
||||
ENV SITEURL=$siteurl
|
||||
ARG offenaccountid
|
||||
ENV OFFEN_ACCOUNT_ID=$offenaccountid
|
||||
|
||||
RUN npm install -g postcss-cli@^6.1.3 autoprefixer@^9.7.0 svgo@^1.3.0
|
||||
RUN apt-get update \
|
||||
|
@ -1,3 +1,4 @@
|
||||
import os
|
||||
from datetime import datetime
|
||||
from calendar import month_name
|
||||
# If your site is available via HTTPS, make sure SITEURL begins with https://
|
||||
@ -69,4 +70,4 @@ PATREON_URL = 'https://www.patreon.com/offen'
|
||||
LINKEDIN_URL = 'https://www.linkedin.com/company/hioffen'
|
||||
TWITTER_URL = 'https://twitter.com/hioffen'
|
||||
|
||||
# OFFEN_ACCOUNT_ID = '9b63c4d8-65c0-438c-9d30-cc4b01173393'
|
||||
OFFEN_ACCOUNT_ID = os.environ.get('OFFEN_ACCOUNT_ID', None)
|
||||
|
@ -15,5 +15,3 @@ FEED_ALL_ATOM = 'feeds/all.atom.xml'
|
||||
DELETE_OUTPUT_DIRECTORY = True
|
||||
|
||||
PLUGINS += ['optimize_images']
|
||||
|
||||
# OFFEN_ACCOUNT_ID = '5ec8345a-2a45-4eb9-92e5-8d9e5684db58'
|
||||
|
@ -28,7 +28,7 @@
|
||||
<link rel="preload" href="/theme/fonts/rubik-v9-latin-regular.woff2" as="font" crossorigin>
|
||||
<link rel="preload" href="/theme/fonts/rubik-v9-latin-500.woff2" as="font" crossorigin>
|
||||
{% if OFFEN_ACCOUNT_ID and not no_stats %}
|
||||
<script async src="/script.js" data-account-id="{{ OFFEN_ACCOUNT_ID }}"></script>
|
||||
<script async src="https://analytics.offen.dev/script.js" data-account-id="{{ OFFEN_ACCOUNT_ID }}"></script>
|
||||
{% endif %}
|
||||
</head>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user