Skip to content

Commit

Permalink
docs: move API docs to packages.electronjs.org (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao authored Feb 19, 2025
1 parent 8be1f8d commit 4db3340
Showing 1 changed file with 17 additions and 27 deletions.
44 changes: 17 additions & 27 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,34 @@ name: Publish documentation

on:
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+*

permissions: {}
permissions:
id-token: write
contents: read

jobs:
docs:
runs-on: ubuntu-latest
environment: docs-publish
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
id: generate-token
with:
creds: ${{ secrets.GH_APP_CREDS }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag: v4.2.2
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Fetch all git branches
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # tag: v4.2.0
with:
node-version: 22.12.x
- run: yarn --frozen-lockfile
- run: yarn build:docs
- name: Prepare docs
uses: malept/github-action-gh-pages@f7952a65c4b763dc84b824a530dc38bd375ac91e # tag: v1.4.0
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Build API documentation
run: yarn build:docs
- name: Azure login
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
defaultBranch: main
noCommit: true
showUnderscoreFiles: true
versionDocs: true
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Commit docs
uses: dsanders11/github-app-commit-action@43de6da2f4d927e997c0784c7a0b61bd19ad6aac # v1.5.0
client-id: ${{ secrets.AZURE_OIDC_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_OIDC_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_OIDC_SUBSCRIPTION_ID }}
- name: Upload to Azure Blob Storage
uses: azure/cli@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # tag: v2.1.0
with:
fail-on-no-changes: false
message: 'Publish [skip ci]'
token: ${{ steps.generate-token.outputs.token }}
inlineScript: |
az storage blob upload-batch --account-name ${{ secrets.AZURE_ECOSYSTEM_PACKAGES_STORAGE_ACCOUNT_NAME }} -d '$web/get/${{ github.ref_name }}' -s ./docs --overwrite --auth-mode login

0 comments on commit 4db3340

Please sign in to comment.