Skip to content

Commit a1390d1

Browse files
author
Alex Stewart
committed
.github:publish-page.yml: use peaceiris' gh-pages action
Use peaceiris' gh-pages action to create and publish the gh-pages, because it can do so in an automated fashion (does not require final approval from an admin.) When using this action, it automatically adds a .nojekyll file, so remove the unneeded source file. Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
1 parent 2bbdf9d commit a1390d1

2 files changed

Lines changed: 18 additions & 24 deletions

File tree

.github/workflows/publish-page.yml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
1+
12
name: "Publish Documentation"
23

34
on:
45
push:
56
branches:
6-
- main
7+
- main
8+
79
jobs:
8-
build:
10+
deploy:
911
runs-on: ubuntu-latest
1012
steps:
11-
- uses: actions/setup-python@v2
12-
- uses: actions/checkout@master
13-
with:
14-
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
15-
- name: Build and Commit
16-
uses: sphinx-notes/pages@v2
17-
with:
18-
target_branch: 'gh-pages'
19-
documentation_path: './docs/source'
20-
- name: Preserve Configuration Files
21-
run: |
22-
echo "* @amstewart" > CODEOWNERS
23-
git checkout gh-pages^ -- CNAME
24-
- name: Create Pull Request
25-
uses: peter-evans/create-pull-request@v4
26-
with:
27-
token: ${{ secrets.GITHUB_TOKEN }}
28-
base: 'gh-pages'
29-
delete-branch: true
30-
title: 'gh-pages updates from ${{ github.sha }}'
31-
branch: 'dev/automated-updates-${{ github.sha }}'
32-
body: 'Automated updates to published pages from ${{ github.sha }}'
13+
- name: Checkout main branch
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Build project
19+
uses: ./.github/actions/build
20+
21+
- name: Deploy to GitHub Pages
22+
uses: peaceiris/actions-gh-pages@v4
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
publish_dir: docs/build/html
26+
publish_branch: gh-pages

.nojekyll

Whitespace-only changes.

0 commit comments

Comments
 (0)