Skip to content

Commit cb2f9b2

Browse files
authored
Fix preview/postmerge doc publishing conflict. (#22)
* Fix preview/postmerge doc publishing conflict. This removes the GHA to push to pages and instead just publishes the `gh-pages` branch to pages. It also changes our doc publishing to work by just publishing to that branch. * Only run publishing steps when docs change. * Add some more lint/format checks. (#21) * Add some more lint/format checks. * Add yamlfmt as a required check * Make it easier for people to run the checks locally * yamlfmt all files. * Fix workflow to be correct path. * Fix yaml formatting
1 parent 567a3d0 commit cb2f9b2

File tree

2 files changed

+12
-49
lines changed

2 files changed

+12
-49
lines changed

.github/workflows/publish_docs.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ on:
33
push:
44
branches:
55
- master
6+
paths:
7+
- '**.md'
8+
- '.github/workflow/publish*'
69
workflow_dispatch:
710
permissions:
811
pages: 'write'
912
id-token: 'write'
1013
jobs:
11-
build:
12-
name: "Build Docs"
14+
build-and-deploy:
15+
name: "Build and Deploy Docs"
1316
runs-on: 'ubuntu-latest'
1417
steps:
1518
- uses: 'actions/checkout@v4'
@@ -18,18 +21,11 @@ jobs:
1821
with:
1922
src: 'docs'
2023
dst: 'generated-pages'
21-
- name: 'Upload artifact'
22-
uses: 'actions/upload-pages-artifact@v3'
24+
- name: 'Install rsync'
25+
run: 'apt-get update && apt-get install -y rsync'
26+
- name: 'Deploy Docs'
27+
uses: JamesIves/github-pages-deploy-action@v4
2328
with:
24-
path: 'generated-pages'
25-
deploy:
26-
name: "Deploy Docs"
27-
environment:
28-
name: 'github-pages'
29-
url: '${{ steps.deployment.outputs.page_url }}'
30-
runs-on: 'ubuntu-latest'
31-
needs: 'build'
32-
steps:
33-
- name: 'Deploy to GitHub Pages'
34-
id: 'deployment'
35-
uses: 'actions/deploy-pages@v4'
29+
folder: generated-pages
30+
force: false
31+
clean-exclude: pr-preview/

.github/workflows/publish_docs_preview_branch.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)