From 71d202c022fb91b578269b724ea8b331576f623f Mon Sep 17 00:00:00 2001 From: German Date: Wed, 2 Feb 2022 19:15:00 +0100 Subject: [PATCH 1/5] Moving update github pages to another step --- .github/workflows/ci-build.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 6589a4902..aaf4a5109 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -8,10 +8,9 @@ on: branches: - main - jobs: docs_build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -48,6 +47,21 @@ jobs: path: doc/build/latex/*.pdf retention-days: 7 + Release: + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + needs: docs_build + runs-on: ubuntu-latest + steps: + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.9 + + - uses: actions/download-artifact@v2 + + - name: Display structure of downloaded files + run: ls -R + - name: Deploy to gh-pages uses: JamesIves/github-pages-deploy-action@4.1.5 with: @@ -56,3 +70,9 @@ jobs: FOLDER: doc/build/html CLEAN: true single-commit: true + + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: | + ./**/*.pdf \ No newline at end of file From 5400e7bcdf871eb452986d763f5cc9c9f2f73746 Mon Sep 17 00:00:00 2001 From: German Date: Wed, 2 Feb 2022 19:36:09 +0100 Subject: [PATCH 2/5] fix github_token thing --- .github/workflows/ci-build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index aaf4a5109..c348b9986 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -36,14 +36,14 @@ jobs: - name: Upload HTML Documentation uses: actions/upload-artifact@v2.2.4 with: - name: Documentation + name: HTML-Documentation path: doc/build/html retention-days: 7 - name: Upload PDF Documentation uses: actions/upload-artifact@v2.2.4 with: - name: Documentation + name: PDF-Documentation path: doc/build/latex/*.pdf retention-days: 7 @@ -65,10 +65,10 @@ jobs: - name: Deploy to gh-pages uses: JamesIves/github-pages-deploy-action@4.1.5 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: doc/build/html - CLEAN: true + token: ${{ secrets.github_token }} + branch: gh-pages + folder: doc/build/html + clean: true single-commit: true - name: Release From 1ba14b1071acd7030bde5c6a8518cea50da5e447 Mon Sep 17 00:00:00 2001 From: German Date: Wed, 2 Feb 2022 19:36:57 +0100 Subject: [PATCH 3/5] adding eol --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c348b9986..22bf08c3b 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -75,4 +75,4 @@ jobs: uses: softprops/action-gh-release@v1 with: files: | - ./**/*.pdf \ No newline at end of file + ./**/*.pdf From f9dbfb7ec663f981531d7d69732b8700eb5235ab Mon Sep 17 00:00:00 2001 From: German Date: Wed, 2 Feb 2022 19:47:15 +0100 Subject: [PATCH 4/5] Matching python versions in steps --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 22bf08c3b..6899b31c1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -55,7 +55,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: 3.8 - uses: actions/download-artifact@v2 From 329f75344c37ac4a7a1fd5862804a605a9e1402e Mon Sep 17 00:00:00 2001 From: German Date: Wed, 2 Feb 2022 19:54:29 +0100 Subject: [PATCH 5/5] Uploading nightly --- .github/workflows/nightly-build.yml | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/nightly-build.yml diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml new file mode 100644 index 000000000..1cfeab2fa --- /dev/null +++ b/.github/workflows/nightly-build.yml @@ -0,0 +1,55 @@ +name: Nightly Documentation Build + + +on: + schedule: # UTC at 0400 + - cron: '0 4 * * */2' # To run every 3 days + workflow_dispatch: + +jobs: + nightly_docs_build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2.2.2 + with: + python-version: 3.8 + + - name: Build HTML Documentation + run: | + pip install -r requirements_docs.txt --disable-pip-version-check + make -C doc html SPHINXOPTS="-W" + touch doc/build/html/.nojekyll + echo "dev.docs.pyansys.com" > doc/build/html/CNAME + + - name: Build PDF Documentation + run: | + sudo apt update + sudo apt-get install -y texlive-latex-extra latexmk + make -C doc latexpdf + + - name: Upload HTML Documentation + uses: actions/upload-artifact@v2.2.4 + with: + name: HTML-Documentation + path: doc/build/html + retention-days: 7 + + - name: Upload PDF Documentation + uses: actions/upload-artifact@v2.2.4 + with: + name: PDF-Documentation + path: doc/build/latex/*.pdf + retention-days: 7 + + - name: Deploy to gh-pages + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + token: ${{ secrets.github_token }} + branch: gh-pages + folder: doc/build/html + clean: true + single-commit: true