Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
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,17 +31,25 @@ jobs:
npm ci --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.FONTAWESOME_AUTH_TOKEN }}
- name: Build
run: hugo --minify
- name: Upload artifact
- name: Build production
run: hugo --minify --destination public/prod
- name: Build staging
run: hugo --baseURL=https://staging.cryptomator.org/ --environment=staging --minify --destination public/staging
- name: Upload Prod Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'public'
name: prod-site
path: ./public/prod
- name: Upload Staging artifacts
uses: actions/upload-artifact@v4
with:
name: staging-site
path: ./public/staging

# 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
Expand All @@ -51,6 +59,30 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
with:
artifact_name: prod-site
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: staging-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
publish_branch: main
cname: staging.cryptomator.org

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

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