Skip to content

Commit

Permalink
multi build for domain
Browse files Browse the repository at this point in the history
  • Loading branch information
XueMoMo committed Aug 28, 2024
1 parent 9e588cf commit 72d491d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 47 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/docker.yml

This file was deleted.

26 changes: 17 additions & 9 deletions .github/workflows/gh-pages-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ on:
push:
branches:
- main

jobs:
build:
strategy:
matrix:
domain: ["ethda.io", "ethda.app"]
include:
- domain: "ethda.io"
dk_key: DK_ETHDA_IO
- domain: "ethda.app"
dk_key: DK_ETHDA_APP

if: github.repository == 'crustio/ethda-docs'
runs-on: ubuntu-latest
steps:
Expand All @@ -19,18 +28,17 @@ jobs:
node-version: v18.18.0

- name: Install dependencies
uses: borales/[email protected]
with:
cmd: install
run: yarn install --frozen-lockfile

- name: Build for production
uses: borales/actions-yarn@v3.0.0
with:
cmd: build
run: yarn build
env:
SITE_URL: "https://docs.${{ matrix.domain }}"

- name: Deploy Gh-Pages 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets[matrix.dk_key] }}
publish_dir: ./build
cname: docs.ethda.io
destination_dir: crust-pages/docs.${{matrix.domain}}
cname: "docs.${{matrix.domain}}"
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config = {
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://docs.ethda.io',
url: process.env.SITE_URL || 'https://docs.ethda.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
Expand Down

0 comments on commit 72d491d

Please sign in to comment.