Skip to content

[ECO-1871] Add Docusaurus skeleton #3

[ECO-1871] Add Docusaurus skeleton

[ECO-1871] Add Docusaurus skeleton #3

---
jobs:
build:
defaults:
run:
working-directory: 'doc/doc-site'
permissions:
contents: 'read'
deployments: 'write'
runs-on: 'ubuntu-latest'
steps:
-
uses: 'actions/checkout@v3'
-
name: 'Install Node.js'
uses: 'actions/setup-node@v3'
with:
node-version: 20
-
id: 'pnpm-install'
name: 'Install pnpm'
uses: 'pnpm/action-setup@v2'
with:
run_install: false
version: '9.1.2'
-
id: 'pnpm-cache'
name: 'Get pnpm store directory'
run: 'echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT'
shell: 'bash'
-
name: 'Setup pnpm cache'
uses: 'actions/cache@v3'
with:
key: |
${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: '${{ steps.pnpm-cache.outputs.STORE_PATH }}'
restore-keys: '${{ runner.os }}-pnpm-store-'
-
name: 'Install dependencies'
run: 'pnpm install --frozen-lockfile'
-
name: 'Build Docusaurus page'
run: 'pnpm build'
-
name: 'Publish to Cloudflare Pages'
uses: 'cloudflare/pages-action@1'
with:
accountId: '${{ secrets.CLOUDFLARE_ACCOUNT_ID }}'
apiToken: '${{ secrets.CLOUDFLARE_API_TOKEN }}'
directory: 'doc/doc-site/build'
# gitHubToken: '${{ secrets.GITHUB_TOKEN }}'
projectName: 'emojicoin-dot-fun-docs'
name: 'Build and deploy docs site'
'on':
pull_request: # Changed from `push` for testing
branches:
- 'main'
paths:
- 'doc/doc-site/**'
- '.github/workflows/deploy-doc-site.yml'
workflow_dispatch: null
...