📖 Deploy docs #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# DEPLOY DOCS WEB TO CLOUDFLARE | |
############################################################################### | |
name: 📖 Deploy docs | |
############################################################################### | |
# ON | |
############################################################################### | |
on: | |
workflow_dispatch: | |
############################################################################### | |
# JOBS | |
############################################################################### | |
jobs: | |
deploy: | |
name: Deploy documentation web | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
####################################################################### | |
# STEPS | |
####################################################################### | |
steps: | |
######################################################################### | |
# INIT & BUILD PKG | |
######################################################################### | |
- name: 🛎 Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
######################################################################### | |
# BUILD PKG | |
######################################################################### | |
- name: 🔑 Install PNPM | |
uses: pnpm/action-setup@v2 | |
- name: 📦 Install pkg dependencies | |
run: pnpm install --no-frozen-lockfile | |
################################################################### | |
# BUILD AND DEPLOY | |
################################################################### | |
- name: 🏗 Build package | |
run: pnpm run build:docs | |
- name: 🌥 Deploy in cloudflare pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
branch: main | |
projectName: "bepp" | |
directory: 'packages/docs/dist' | |
wranglerVersion: '3' |