Skip to content

Commit 8bafe2a

Browse files
authored
🚀 GitHub Actions update, use commit from PR, not pre-merge (fastapi#1761)
* 🔥 Remove deploy badge that won't show correctly until next release after the fixes to the Gitter bot * 🐛 Fix GitHub Action to upload docs artifacts with commit from PR, not pre-merge * ♻️ Run zip docs and artifact upload only on PRs
1 parent 42f1716 commit 8bafe2a

File tree

6 files changed

+3
-16
lines changed

6 files changed

+3
-16
lines changed

.github/workflows/build-docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ jobs:
1919
- name: Build Docs
2020
run: python3.7 ./scripts/docs.py build-all
2121
- name: Zip docs
22+
if: github.event_name == 'pull_request'
2223
run: bash ./scripts/zip-docs.sh
2324
- uses: actions/upload-artifact@v2
25+
if: github.event_name == 'pull_request'
2426
with:
25-
name: docs-zip-${{ github.sha }}
27+
name: docs-zip-${{ github.event.pull_request.head.sha }}
2628
path: ./docs.zip
2729
- name: Deploy to Netlify
2830
uses: nwtgck/actions-netlify@v1.1.5

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
99
<img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
1010
</a>
11-
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3APublish" target="_blank">
12-
<img src="https://github.com/tiangolo/fastapi/workflows/Publish/badge.svg" alt="Publish">
13-
</a>
1411
<a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
1512
<img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
1613
</a>

docs/en/docs/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
99
<img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
1010
</a>
11-
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3APublish" target="_blank">
12-
<img src="https://github.com/tiangolo/fastapi/workflows/Publish/badge.svg" alt="Publish">
13-
</a>
1411
<a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
1512
<img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
1613
</a>

docs/es/docs/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
99
<img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
1010
</a>
11-
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3APublish" target="_blank">
12-
<img src="https://github.com/tiangolo/fastapi/workflows/Publish/badge.svg" alt="Publish">
13-
</a>
1411
<a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
1512
<img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
1613
</a>

docs/pt/docs/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
99
<img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
1010
</a>
11-
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3APublish" target="_blank">
12-
<img src="https://github.com/tiangolo/fastapi/workflows/Publish/badge.svg" alt="Publish">
13-
</a>
1411
<a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
1512
<img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
1613
</a>

docs/zh/docs/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
99
<img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
1010
</a>
11-
<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3APublish" target="_blank">
12-
<img src="https://github.com/tiangolo/fastapi/workflows/Publish/badge.svg" alt="Publish">
13-
</a>
1411
<a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
1512
<img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
1613
</a>

0 commit comments

Comments
 (0)