Skip to content

Commit 0bd9d07

Browse files
committed
Merge branch 'develop' into feature/hub-experiments
2 parents fd03fc4 + 00da8a9 commit 0bd9d07

37 files changed

+446
-313
lines changed

.github/workflows/gh-pages.yml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,27 @@ jobs:
3131
npm ci --ignore-scripts
3232
env:
3333
NODE_AUTH_TOKEN: ${{ secrets.FONTAWESOME_AUTH_TOKEN }}
34-
- name: Build
35-
run: hugo --minify
36-
- name: Upload artifact
34+
- name: Build production
35+
run: hugo --minify --destination public/prod
36+
- name: Build staging
37+
run: hugo --baseURL=https://staging.cryptomator.org/ --environment=staging --minify --destination public/staging
38+
- name: Add robots.txt for staging
39+
run: 'echo -e "User-agent: *\nDisallow: /" > public/staging/robots.txt'
40+
- name: Upload Prod Pages artifact
3741
uses: actions/upload-pages-artifact@v3
3842
with:
39-
path: 'public'
43+
name: prod-site
44+
path: ./public/prod
45+
- name: Upload Staging artifacts
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: staging-site
49+
path: ./public/staging
4050

41-
# DEPLOY
42-
deploy:
51+
# DEPLOY PROD
52+
deploy-prod:
4353
if: github.ref == 'refs/heads/main'
44-
name: Deploy to GitHub Pages
54+
name: Deploy Prod to GitHub Pages
4555
runs-on: ubuntu-latest
4656
needs: [build]
4757
permissions: # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
@@ -51,6 +61,30 @@ jobs:
5161
- name: Deploy to GitHub Pages
5262
id: deployment
5363
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
64+
with:
65+
artifact_name: prod-site
5466
environment: # Deploy to the github-pages environment
5567
name: github-pages
5668
url: ${{ steps.deployment.outputs.page_url }}
69+
70+
# DEPLOY STAGING
71+
deploy-staging:
72+
if: github.ref == 'refs/heads/develop'
73+
name: Deploy Staging to GitHub Pages
74+
runs-on: ubuntu-latest
75+
needs: [build]
76+
steps:
77+
- name: Download build
78+
uses: actions/download-artifact@v4
79+
with:
80+
name: staging-site
81+
path: ./public
82+
- name: Deploy to Staging Repository
83+
uses: peaceiris/actions-gh-pages@v3
84+
with:
85+
personal_token: ${{ secrets.CRYPTOBOT_DEPLOY_STAGING_WEBSITE }}
86+
external_repository: cryptomator/staging.cryptomator.github.io
87+
publish_dir: ./public
88+
publish_branch: main
89+
cname: staging.cryptomator.org
90+

assets/css/custom.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ textarea:read-only {
200200
[id]::before {
201201
content: '';
202202
display: block;
203-
height: 138px;
204-
margin-top: -138px;
203+
height: 96px;
204+
margin-top: -96px;
205205
visibility: hidden;
206206
}

assets/js/cardpayments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
const STRIPE_PHP_URL = BASE_API_URL + '/stripe/prepare_payment.php';
3+
const STRIPE_PHP_URL = LEGACY_API_URL + '/stripe/prepare_payment.php';
44

55
class OneTimePayment {
66

assets/js/const.dev.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

assets/js/const.prod.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

assets/js/const.template.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"use strict";
2+
3+
const API_BASE_URL = '{{ .Site.Params.apiBaseURL }}';
4+
const LEGACY_API_URL = '{{ .Site.Params.legacyApiUrl }}';
5+
const PADDLE_ENABLE_SANDBOX = {{ .Site.Params.paddleEnableSandbox }};
6+
const PADDLE_VENDOR_ID = {{ .Site.Params.paddleVendorId }};
7+
const PADDLE_DESKTOP_PRODUCT_IDS = {{ .Site.Params.paddleDesktopProductIds | jsonify }};
8+
const PADDLE_ANDROID_PRODUCT_ID = {{ .Site.Params.paddleAndroidProductId }};
9+
const PADDLE_HUB_SELF_HOSTED_SUBSCRIPTION_PLAN_ID = {{ .Site.Params.paddleHubSelfHostedSubscriptionPlanId }};
10+
const PADDLE_HUB_MANAGED_SUBSCRIPTION_PLAN_ID = {{ .Site.Params.paddleHubManagedSubscriptionPlanId }};
11+
const PADDLE_PRICES_URL = '{{ .Site.Params.paddlePricesUrl }}';
12+
const LEGACY_STORE_URL = '{{ .Site.Params.legacyStoreUrl }}';
13+
const STRIPE_PK = '{{ .Site.Params.stripePk }}';
14+
const STRIPE_PLANS = {{ .Site.Params.stripePlans | jsonify }};

assets/js/customerportal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
const REQUEST_CUSTOMER_PORTAL_URL = BASE_API_URL + '/stripe/request_customer_portal.php';
3+
const REQUEST_CUSTOMER_PORTAL_URL = LEGACY_API_URL + '/stripe/request_customer_portal.php';
44

55
class CustomerPortal {
66

assets/js/hubcontact.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
const REQUEST_HUB_CONTACT_URL = STORE_API_URL + '/hub/request-contact';
3+
const REQUEST_HUB_CONTACT_URL = LEGACY_STORE_URL + '/hub/request-contact';
44

55
class HubContact {
66

assets/js/hubdemo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
const REQUEST_HUB_DEMO_URL = STORE_API_URL + '/hub/request-demo';
3+
const REQUEST_HUB_DEMO_URL = LEGACY_STORE_URL + '/hub/request-demo';
44

55
class HubDemo {
66

assets/js/hubmanaged.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"use strict";
22

33
// requires newsletter.js
4-
const REQUEST_HUB_MANAGED_URL = STORE_API_URL + '/hub/request-managed';
5-
const VALIDATE_HUB_MANAGED_REQUEST_URL = STORE_API_URL + '/hub/validate-managed-request';
4+
const REQUEST_HUB_MANAGED_URL = LEGACY_STORE_URL + '/hub/request-managed';
5+
const VALIDATE_HUB_MANAGED_REQUEST_URL = LEGACY_STORE_URL + '/hub/validate-managed-request';
66

77
class HubManaged {
88

0 commit comments

Comments
 (0)