From 0ae7ecf9add73693b3592bd1e31904c31216dc87 Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 20 Apr 2021 21:28:50 +0200 Subject: [PATCH 1/8] Create gh-pages.yml --- .github/gh-pages.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/gh-pages.yml diff --git a/.github/gh-pages.yml b/.github/gh-pages.yml new file mode 100644 index 000000000..f79edb87f --- /dev/null +++ b/.github/gh-pages.yml @@ -0,0 +1,21 @@ +name: Build and deploy to gh-pages +on: [push] +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 📥 + uses: actions/checkout@v2.3.4 + + - name: Install and Build 🔧 + run: | + sudo apt-get -y update + sudo apt-get -y install python3-pip + pip install mkdocs-material pygments mkdocs-redirects + mkdocs build --verbose --clean + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@4.1.1 + with: + branch: gh-pages # The branch the action should deploy to. + folder: . # The folder the action should deploy. From f1c6bcb11bdb68fb641be18d0e5561278e5c97f7 Mon Sep 17 00:00:00 2001 From: MAGIC Date: Tue, 20 Apr 2021 21:34:11 +0200 Subject: [PATCH 2/8] Add workflows folder --- .github/{ => workflows}/gh-pages.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/gh-pages.yml (100%) diff --git a/.github/gh-pages.yml b/.github/workflows/gh-pages.yml similarity index 100% rename from .github/gh-pages.yml rename to .github/workflows/gh-pages.yml From 26ace065fa53575cd4e3f0db4674f2b6c40c8ef7 Mon Sep 17 00:00:00 2001 From: MAGIC Date: Tue, 20 Apr 2021 21:37:51 +0200 Subject: [PATCH 3/8] Bump Pygments to 2.8.1 --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index f79edb87f..e39419cf3 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -11,7 +11,7 @@ jobs: run: | sudo apt-get -y update sudo apt-get -y install python3-pip - pip install mkdocs-material pygments mkdocs-redirects + pip install mkdocs-material pygments==2.8.1 mkdocs-redirects mkdocs build --verbose --clean - name: Deploy 🚀 From fa82d9a6deb1cb544e9863fb10acafa481ec2fac Mon Sep 17 00:00:00 2001 From: MAGIC Date: Tue, 20 Apr 2021 21:43:59 +0200 Subject: [PATCH 4/8] Separate installing dependencies and build site --- .github/workflows/gh-pages.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index e39419cf3..9451c2130 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -7,15 +7,18 @@ jobs: - name: Checkout 📥 uses: actions/checkout@v2.3.4 - - name: Install and Build 🔧 + - name: Install dependencies 🐄 run: | sudo apt-get -y update sudo apt-get -y install python3-pip pip install mkdocs-material pygments==2.8.1 mkdocs-redirects - mkdocs build --verbose --clean + + - name: Build site 🔧 + run: | + mkdocs build --verbose --clean - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@4.1.1 with: branch: gh-pages # The branch the action should deploy to. - folder: . # The folder the action should deploy. + folder: docs # The folder the action should deploy. From bdfdaa01cb4fa17ea9759077d542062d14b24761 Mon Sep 17 00:00:00 2001 From: MAGIC Date: Tue, 20 Apr 2021 21:45:07 +0200 Subject: [PATCH 5/8] tabs are bad --- .github/workflows/gh-pages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 9451c2130..bd8ef6850 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -14,8 +14,8 @@ jobs: pip install mkdocs-material pygments==2.8.1 mkdocs-redirects - name: Build site 🔧 - run: | - mkdocs build --verbose --clean + run: | + mkdocs build --verbose --clean - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@4.1.1 From d9f26ce1a4a6d9ff1b5bc1147bd5a3788b6e4e2e Mon Sep 17 00:00:00 2001 From: MAGIC Date: Tue, 20 Apr 2021 21:51:22 +0200 Subject: [PATCH 6/8] Use site as folder --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index bd8ef6850..075c81c07 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -21,4 +21,4 @@ jobs: uses: JamesIves/github-pages-deploy-action@4.1.1 with: branch: gh-pages # The branch the action should deploy to. - folder: docs # The folder the action should deploy. + folder: site # The folder the action should deploy. From bf1996b97fe03ee3194d1edacf737eebd6d6cbbe Mon Sep 17 00:00:00 2001 From: MAGIC Date: Tue, 20 Apr 2021 22:01:09 +0200 Subject: [PATCH 7/8] delete travis.yml --- .travis.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 78cdde8a9..000000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: python -install: -- pip install mkdocs-material pygments mkdocs-redirects -script: -- mkdocs build --verbose --clean -deploy: - provider: pages - skip_cleanup: true - github_token: $GITHUB_TOKEN - local_dir: site - name: $BOT_NAME - email: $BOT_EMAIL - on: - branch: master From 77a8a09c196959294cd4d25030d5e953ece79554 Mon Sep 17 00:00:00 2001 From: MAGIC Date: Tue, 20 Apr 2021 22:01:23 +0200 Subject: [PATCH 8/8] Replace build badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 48fe30ca6..f814a2400 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![TRAVIS-CI](https://api.travis-ci.org/mailcow/mailcow-dockerized-docs.svg?branch=master) +[![Build and deploy to gh-pages](https://github.com/mailcow/mailcow-dockerized-docs/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/mailcow/mailcow-dockerized-docs/actions/workflows/gh-pages.yml) # mailcow: dockerized documentation