Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 39 additions & 7 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,58 @@ jobs:
npm ci --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.FONTAWESOME_AUTH_TOKEN }}
- name: Build
run: hugo --minify
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: Build production
run: hugo --minify --destination public/prod
- name: Build staging
run: hugo --environment=staging --minify --destination public/staging
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: site
path: 'public'

# DEPLOY
deploy:
# DEPLOY PROD
deploy-prod:
if: github.ref == 'refs/heads/main'
name: Deploy to GitHub Pages
name: Deploy Prod to GitHub Pages
runs-on: ubuntu-latest
needs: [build]
permissions: # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
steps:
- name: Download build
uses: actions/download-artifact@v4
with:
name: site
path: ./public
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
with:
path: ./public/prod
environment: # Deploy to the github-pages environment
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# DEPLOY STAGING
deploy-staging:
if: github.ref == 'refs/heads/develop'
name: Deploy Staging to GitHub Pages
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download build
uses: actions/download-artifact@v4
with:
name: site
path: ./public
- name: Deploy to Staging Repository
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.GITHUB_TOKEN }}
external_repository: cryptomator/staging.cryptomator.org
publish_dir: ./public/staging
publish_branch: main
cname: staging.cryptomator.org

1 change: 0 additions & 1 deletion config/_default/hugo.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
baseURL: https://cryptomator.org/
title: Cryptomator
defaultContentLanguage: en

Expand Down
2 changes: 2 additions & 0 deletions config/development/params.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
baseURL: https://cryptomator.org/

# API
baseApiUrl: http://localhost
storeApiUrl: http://localhost:8787/api
Expand Down
2 changes: 2 additions & 0 deletions config/production/params.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
baseURL: https://cryptomator.org/

# API
baseApiUrl: http://api.cryptomator.org
storeApiUrl: https://store.cryptomator.org/api
Expand Down
6 changes: 4 additions & 2 deletions config/staging/params.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
baseURL: https://staging.cryptomator.org/

# API
baseApiUrl: http://localhost
storeApiUrl: http://localhost:8787/api
baseApiUrl: http://api.staging.cryptomator.cloud
storeApiUrl: https://store.staging.cryptomator.org/

# UMAMI
umamiWebsiteId: 57a36f3a-bd97-4d8a-9563-0e8d39ddb20c
Expand Down