Selaa lähdekoodia

Build offline documentation for the stable branch as well (#4896)

This must be done on the `master` branch's CI workflow as scheduled
CI workflows only run on the repository's default branch.
Hugo Locurcio 4 vuotta sitten
vanhempi
commit
4664df9819
3 muutettua tiedostoa jossa 12 lisäystä ja 3 poistoa
  1. 10 1
      .github/workflows/build_offline_docs.yml
  2. 1 1
      README.md
  3. 1 1
      index.rst

+ 10 - 1
.github/workflows/build_offline_docs.yml

@@ -1,5 +1,7 @@
 name: Build documentation for offline usage
 name: Build documentation for offline usage
 on:
 on:
+  push: # FIXME
+  pull_request: # FIXME
   schedule:
   schedule:
     # Every week on Monday at midnight (UTC).
     # Every week on Monday at midnight (UTC).
     # This keeps the generated HTML documentation fresh.
     # This keeps the generated HTML documentation fresh.
@@ -8,9 +10,16 @@ on:
 jobs:
 jobs:
   build:
   build:
     runs-on: ubuntu-20.04
     runs-on: ubuntu-20.04
+    strategy:
+      matrix:
+        branch:
+          - master
+          - stable
     steps:
     steps:
       - name: Checkout
       - name: Checkout
         uses: actions/checkout@v2
         uses: actions/checkout@v2
+        with:
+          ref: ${{ matrix.branch }}
 
 
       - name: Install dependencies
       - name: Install dependencies
         run: |
         run: |
@@ -24,7 +33,7 @@ jobs:
 
 
       - uses: actions/upload-artifact@v2
       - uses: actions/upload-artifact@v2
         with:
         with:
-          name: godot-docs-html
+          name: godot-docs-html-${{ matrix.branch }}
           path: _build/html
           path: _build/html
           # Keep the current build and the previous build (in case a scheduled build failed).
           # Keep the current build and the previous build (in case a scheduled build failed).
           # This makes it more likely to have at least one successful build available at all times.
           # This makes it more likely to have at least one successful build available at all times.

+ 1 - 1
README.md

@@ -6,7 +6,7 @@ They are meant to be parsed with the [Sphinx](https://www.sphinx-doc.org/) docum
 
 
 ## Download for offline use
 ## Download for offline use
 
 
-You can [download an HTML copy](https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-html.zip)
+You can [download an HTML copy](https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-html-master.zip)
 for offline reading (updated every Monday). Extract the ZIP archive then open
 for offline reading (updated every Monday). Extract the ZIP archive then open
 the top-level `index.html` in a web browser.
 the top-level `index.html` in a web browser.
 
 

+ 1 - 1
index.rst

@@ -42,7 +42,7 @@ DevDocs, you need to:
 - Click the three dots in the top-left corner, choose **Offline data**.
 - Click the three dots in the top-left corner, choose **Offline data**.
 - Click the **Install** link next to the Godot documentation.
 - Click the **Install** link next to the Godot documentation.
 
 
-You can also `download an HTML copy <https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-html.zip>`__
+You can also `download an HTML copy <https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-html-master.zip>`__
 for offline reading (updated every Monday). Extract the ZIP archive then open
 for offline reading (updated every Monday). Extract the ZIP archive then open
 the top-level ``index.html`` in a web browser.
 the top-level ``index.html`` in a web browser.