Skip to content

Add ApiVoid as silver sponsor #1793

Add ApiVoid as silver sponsor

Add ApiVoid as silver sponsor #1793

Workflow file for this run

name: GitHub Pages
on:
push:
jobs:
# BUILD
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
submodules: true
- name: Setup Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Setup Hugo
uses: peaceiris/actions-hugo@2752ce1d29631191ea3f27c23495fa06139a5b78 # v3.2.1
with:
hugo-version: '0.148.1'
extended: true
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml
- name: Check lockfile
run: bash scripts/check-lockfile.sh
- name: Install dependencies
run: pnpm install --frozen-lockfile
env:
FONTAWESOME_AUTH_TOKEN: ${{ secrets.FONTAWESOME_AUTH_TOKEN }}
- 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: Add robots.txt for staging
run: 'echo -e "User-agent: *\nDisallow: /" > public/staging/robots.txt'
- name: Upload Prod Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
name: prod-site
path: ./public/prod
include-hidden-files: true
- name: Upload Staging artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: staging-site
path: ./public/staging
# DEPLOY PROD
deploy-prod:
if: github.ref == 'refs/heads/main'
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: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
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@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: staging-site
path: ./public
- name: Deploy to Staging Repository
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
with:
personal_token: ${{ secrets.CRYPTOBOT_DEPLOY_STAGING_WEBSITE }}
external_repository: cryptomator/staging.cryptomator.github.io
publish_dir: ./public
publish_branch: main
cname: staging.cryptomator.org