mtcute/.forgejo/workflows/docs.yaml

38 lines
1.1 KiB
YAML
Raw Normal View History

2024-12-11 07:37:19 +03:00
name: Docs
on:
push:
branches:
- master
pull_request:
branches: [ master ]
workflow_dispatch:
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: node22
steps:
- uses: actions/checkout@v4
- uses: ./.forgejo/actions/init
- name: Build docs
run: |
pnpm run docs
2024-12-11 07:37:19 +03:00
touch docs/.nojekyll
echo "ref.mtcute.dev" > docs/CNAME
2024-12-31 01:09:55 +03:00
echo "ignore-workspace-root-check=true" >> .npmrc
2025-01-03 22:42:30 +03:00
curl -O https://gist.githubusercontent.com/j0nl1/7f9b5210c9e6ecbabe322baa16dcb5db/raw/760de77327bf83671cfb6bd4e64181299ba26113/typedoc-fix-cf.mjs
node typedoc-fix-cf.mjs docs
2024-12-11 07:37:19 +03:00
- name: Deploy
# do not run on forks and releases
2025-01-03 22:42:30 +03:00
# if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.actor == 'desu-bot'
2024-12-11 07:37:19 +03:00
uses: https://github.com/cloudflare/wrangler-action@v3
with:
2024-12-31 01:09:55 +03:00
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
2024-12-11 07:37:19 +03:00
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy docs --project-name=mtcute-apiref