workflows/ci_docs: fix documentation deployment (#13819)
* workflows/ci_docs: fix docs publishing It turns out that github.ref is the full ref name, so we have to be a bit more specific. See https://developer.github.com/v3/activity/events/types/#pushevent Also fixed a silly typo :) * workflows/ci_docs: run CI when there are changes to the workflow
This commit is contained in:
parent
b1aa3b1eea
commit
40898871a9
1 changed files with 9 additions and 3 deletions
12
.github/workflows/ci_docs.yml
vendored
12
.github/workflows/ci_docs.yml
vendored
|
|
@ -6,12 +6,14 @@ on:
|
||||||
- 'lib/**.nim'
|
- 'lib/**.nim'
|
||||||
- 'doc/**.rst'
|
- 'doc/**.rst'
|
||||||
- 'doc/nimdoc.css'
|
- 'doc/nimdoc.css'
|
||||||
|
- '.github/workflows/ci_docs.yml'
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
# Run only on changes on these files
|
# Run only on changes on these files
|
||||||
paths:
|
paths:
|
||||||
- 'lib/**.nim'
|
- 'lib/**.nim'
|
||||||
- 'doc/**.rst'
|
- 'doc/**.rst'
|
||||||
|
- '.github/workflows/ci_docs.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -114,14 +116,18 @@ jobs:
|
||||||
run: ./koch doc --git.commit:devel
|
run: ./koch doc --git.commit:devel
|
||||||
|
|
||||||
- name: 'Prepare documentation for deployment'
|
- name: 'Prepare documentation for deployment'
|
||||||
if: github.event_name == 'push' && github.ref == 'devel' && matrix.target == 'linux'
|
if: |
|
||||||
|
github.event_name == 'push' && github.ref == 'refs/heads/devel' &&
|
||||||
|
matrix.target == 'linux'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cp -f doc/html/{overview,index}.html
|
run: cp -f doc/html/{overview,index}.html
|
||||||
|
|
||||||
- name: 'Publish documentation to Github Pages'
|
- name: 'Publish documentation to Github Pages'
|
||||||
if: github.event_name == 'push' && github.ref == 'devel' && matrix.target == 'linux'
|
if: |
|
||||||
|
github.event_name == 'push' && github.ref == 'refs/heads/devel' &&
|
||||||
|
matrix.target == 'linux'
|
||||||
uses: crazy-max/ghaction-github-pages@v1
|
uses: crazy-max/ghaction-github-pages@v1
|
||||||
with:
|
with:
|
||||||
build-dir: doc/html
|
build_dir: doc/html
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue