-
Notifications
You must be signed in to change notification settings - Fork 7
34 lines (31 loc) · 1.06 KB
/
publish-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Publish Doc Site
on:
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build Docs
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
& .\PwshSpectreConsole\Build.ps1
Install-Module HelpOut -Scope CurrentUser -Force
& .\PwshSpectreConsole.Docs\UpdateDocs.ps1 -NonInteractive
git config --global user.name 'Shaun Lawrie (via GitHub Actions)'
git config --global user.email '[email protected]'
git add PwshSpectreConsole.Docs/src/content
git commit -m "[skip ci] Update docs"
git push
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
workingDirectory: "./PwshSpectreConsole.Docs/dist"
command: pages deploy . --project-name pwshspectreconsole --commit-dirty=true --branch=main