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: |
|
2024-12-28 11:17:11 +03:00
|
|
|
pnpm run docs
|
2024-12-11 07:37:19 +03:00
|
|
|
touch docs/.nojekyll
|
|
|
|
echo "ref.mtcute.dev" > docs/CNAME
|
|
|
|
- name: Deploy
|
|
|
|
# do not run on forks and releases
|
2024-12-31 00:39:51 +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:
|
|
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
|
|
command: pages deploy docs --project-name=mtcute-apiref
|