]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🚀 GitHub Actions update, use commit from PR, not pre-merge (#1761)
authorSebastián Ramírez <tiangolo@gmail.com>
Tue, 21 Jul 2020 21:08:14 +0000 (23:08 +0200)
committerGitHub <noreply@github.com>
Tue, 21 Jul 2020 21:08:14 +0000 (23:08 +0200)
* 🔥 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

.github/workflows/build-docs.yml
README.md
docs/en/docs/index.md
docs/es/docs/index.md
docs/pt/docs/index.md
docs/zh/docs/index.md

index 1bda0429abf674caddeb7e2c68b238e0fcf35321..9c2349923b58e8b35aa9df21b0aa37fe109e65cd 100644 (file)
@@ -19,10 +19,12 @@ jobs:
       - name: Build Docs
         run: python3.7 ./scripts/docs.py build-all
       - name: Zip docs
+        if: github.event_name == 'pull_request'
         run: bash ./scripts/zip-docs.sh
       - uses: actions/upload-artifact@v2
+        if: github.event_name == 'pull_request'
         with:
-          name: docs-zip-${{ github.sha }}
+          name: docs-zip-${{ github.event.pull_request.head.sha }}
           path: ./docs.zip
       - name: Deploy to Netlify
         uses: nwtgck/actions-netlify@v1.1.5
index 1fcdb4e2fc8b370659ed644e3cdd15f360307517..9fed5de828091e0aedc9df67a8eb21f26fbfdf97 100644 (file)
--- a/README.md
+++ b/README.md
@@ -8,9 +8,6 @@
 <a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
     <img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
 </a>
-<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3APublish" target="_blank">
-    <img src="https://github.com/tiangolo/fastapi/workflows/Publish/badge.svg" alt="Publish">
-</a>
 <a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
     <img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
 </a>
index 1fcdb4e2fc8b370659ed644e3cdd15f360307517..9fed5de828091e0aedc9df67a8eb21f26fbfdf97 100644 (file)
@@ -8,9 +8,6 @@
 <a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
     <img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
 </a>
-<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3APublish" target="_blank">
-    <img src="https://github.com/tiangolo/fastapi/workflows/Publish/badge.svg" alt="Publish">
-</a>
 <a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
     <img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
 </a>
index 197bf3322ccb1674e57b40836ba6069f88b38008..c60c57d6d101ffd30b2b200ffa500e7323e26e26 100644 (file)
@@ -8,9 +8,6 @@
 <a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
     <img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
 </a>
-<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3APublish" target="_blank">
-    <img src="https://github.com/tiangolo/fastapi/workflows/Publish/badge.svg" alt="Publish">
-</a>
 <a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
     <img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
 </a>
index 76bc202df6a10b787450790847a6588c225206c7..574a49b17edbed8b8cfa22c92dd421be8e034d9b 100644 (file)
@@ -8,9 +8,6 @@
 <a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
     <img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
 </a>
-<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3APublish" target="_blank">
-    <img src="https://github.com/tiangolo/fastapi/workflows/Publish/badge.svg" alt="Publish">
-</a>
 <a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
     <img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
 </a>
index fb172934251711d8f965038258eb6b510fed5ef7..851255334e122fcedf8ae93cfc580ab86293d048 100644 (file)
@@ -8,9 +8,6 @@
 <a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3ATest" target="_blank">
     <img src="https://github.com/tiangolo/fastapi/workflows/Test/badge.svg" alt="Test">
 </a>
-<a href="https://github.com/tiangolo/fastapi/actions?query=workflow%3APublish" target="_blank">
-    <img src="https://github.com/tiangolo/fastapi/workflows/Publish/badge.svg" alt="Publish">
-</a>
 <a href="https://codecov.io/gh/tiangolo/fastapi" target="_blank">
     <img src="https://img.shields.io/codecov/c/github/tiangolo/fastapi?color=%2334D058" alt="Coverage">
 </a>