From 77826b7ff3856859cffac660306c945651775442 Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Wed, 15 Jun 2022 15:11:59 -0600 Subject: [PATCH 1/9] Try out CI and CI for manual --- .github/CODEOWNERS | 1 + .github/workflows/cd.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/ci.yml | 15 +++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/cd.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..bbeed9a --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +/.github/workflows @quicksilver/developers diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..b121e07 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,29 @@ +name: Deploy + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Pull changes + env: + SERVER: ${{ secrets.SERVER }} + PORT: ${{ secrets.PORT }} + SSH_KEY: ${{secrets.SSH_KEY}} + run: | + echo "${SSH_KEY}" > /tmp/key + chmod 0600 /tmp/key + + ssh -T "${SERVER}" -p "${PORT}" -i /tmp/key -o StrictHostKeyChecking=no <<'EOF' + cd /data/manaul + git pull --dry-run + venv/bin/python plugindocs.py + venv/bin/python -m mkdocs build + EOF diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5f9f2b7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,15 @@ +name: Check + +on: + push: + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Build docs + run: | + python3 -m pip install --upgrade pip + python3 -m pip install --upgrade mkdocs + python3 plugindocs.py + python3 -m mkdocs build From 8c99286595d097b06ca3557f97afc815ea14cb85 Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Wed, 15 Jun 2022 15:14:06 -0600 Subject: [PATCH 2/9] Check out first --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f9f2b7..b1d92df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,9 @@ jobs: build: runs-on: ubuntu-20.04 steps: + - uses: actions/checkout@v2 + with: + submodules: recursive - name: Build docs run: | python3 -m pip install --upgrade pip From 44434989b70d0b62506a266e62e119cf2ae5e382 Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Wed, 15 Jun 2022 15:15:26 -0600 Subject: [PATCH 3/9] Fine, I'll use the requirements file --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1d92df..e6c0bfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,6 @@ jobs: - name: Build docs run: | python3 -m pip install --upgrade pip - python3 -m pip install --upgrade mkdocs + python3 -m pip install -r requirements.txt python3 plugindocs.py python3 -m mkdocs build From 9f7b1924d7dcd265691fb7d0f064234305aeab4b Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Wed, 15 Jun 2022 15:17:46 -0600 Subject: [PATCH 4/9] Temporarily disable branch filter --- .github/workflows/cd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b121e07..62bb93e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -3,7 +3,6 @@ name: Deploy on: push: branches: - - main jobs: deploy: From 1ca45ae41b7f8a8abe307a5cadc48cffee330f5e Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Wed, 15 Jun 2022 15:24:15 -0600 Subject: [PATCH 5/9] lint and fix typo in manaul --- .github/workflows/cd.yml | 35 ++++++++++++++++++----------------- .github/workflows/ci.yml | 19 ++++++++++--------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 62bb93e..b8a5bdb 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,3 +1,4 @@ +--- name: Deploy on: @@ -8,21 +9,21 @@ jobs: deploy: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - name: Pull changes - env: - SERVER: ${{ secrets.SERVER }} - PORT: ${{ secrets.PORT }} - SSH_KEY: ${{secrets.SSH_KEY}} - run: | - echo "${SSH_KEY}" > /tmp/key - chmod 0600 /tmp/key + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Pull changes + env: + SERVER: ${{ secrets.SERVER }} + PORT: ${{ secrets.PORT }} + SSH_KEY: ${{secrets.SSH_KEY}} + run: | + echo "${SSH_KEY}" > /tmp/key + chmod 0600 /tmp/key - ssh -T "${SERVER}" -p "${PORT}" -i /tmp/key -o StrictHostKeyChecking=no <<'EOF' - cd /data/manaul - git pull --dry-run - venv/bin/python plugindocs.py - venv/bin/python -m mkdocs build - EOF + ssh -T "${SERVER}" -p "${PORT}" -i /tmp/key -o StrictHostKeyChecking=no <<'EOF' + cd /data/manual + git pull --dry-run + venv/bin/python plugindocs.py + venv/bin/python -m mkdocs build + EOF diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6c0bfe..f25b8d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +--- name: Check on: @@ -7,12 +8,12 @@ jobs: build: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - name: Build docs - run: | - python3 -m pip install --upgrade pip - python3 -m pip install -r requirements.txt - python3 plugindocs.py - python3 -m mkdocs build + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Build docs + run: | + python3 -m pip install --upgrade pip + python3 -m pip install -r requirements.txt + python3 plugindocs.py + python3 -m mkdocs build From 93b708bdc833d1ecaa57dc5eb79acb6e8e1cae96 Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Wed, 15 Jun 2022 19:40:06 -0600 Subject: [PATCH 6/9] Run with ssh ForceCommand --- .github/workflows/cd.yml | 9 +++------ scripts/gha.sh | 12 ++++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100755 scripts/gha.sh diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b8a5bdb..ed882e2 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -4,6 +4,8 @@ name: Deploy on: push: branches: + - main + - GHA jobs: deploy: @@ -21,9 +23,4 @@ jobs: echo "${SSH_KEY}" > /tmp/key chmod 0600 /tmp/key - ssh -T "${SERVER}" -p "${PORT}" -i /tmp/key -o StrictHostKeyChecking=no <<'EOF' - cd /data/manual - git pull --dry-run - venv/bin/python plugindocs.py - venv/bin/python -m mkdocs build - EOF + ssh -T "${SERVER}" -p "${PORT}" -i /tmp/key -o StrictHostKeyChecking=no diff --git a/scripts/gha.sh b/scripts/gha.sh new file mode 100755 index 0000000..b89f6c1 --- /dev/null +++ b/scripts/gha.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -Eeuf -o pipefail +shopt -s inherit_errexit + +main() { + cd /data/manual + git pull --dry-run + venv/bin/python plugindocs.py + venv/bin/python -m mkdocs build +} +main "$@" From 19d1370c33610a0d2d95f0b83f90603848b7313d Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Sat, 18 Jun 2022 11:19:00 -0600 Subject: [PATCH 7/9] Move gha to a separate repo --- .github/workflows/cd.yml | 2 +- scripts/gha.sh | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100755 scripts/gha.sh diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ed882e2..dc588cd 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -23,4 +23,4 @@ jobs: echo "${SSH_KEY}" > /tmp/key chmod 0600 /tmp/key - ssh -T "${SERVER}" -p "${PORT}" -i /tmp/key -o StrictHostKeyChecking=no + ssh -T "${SERVER}" -p "${PORT}" -i /tmp/key -o StrictHostKeyChecking=no "${GITHUB_REPOSITORY}" diff --git a/scripts/gha.sh b/scripts/gha.sh deleted file mode 100755 index b89f6c1..0000000 --- a/scripts/gha.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -Eeuf -o pipefail -shopt -s inherit_errexit - -main() { - cd /data/manual - git pull --dry-run - venv/bin/python plugindocs.py - venv/bin/python -m mkdocs build -} -main "$@" From f47dba5bccac643fe2f99b5104af469d8924b87f Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Sat, 18 Jun 2022 11:32:10 -0600 Subject: [PATCH 8/9] Only run on main --- .github/workflows/cd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index dc588cd..1a869b0 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -5,7 +5,6 @@ on: push: branches: - main - - GHA jobs: deploy: From 8b571e5c3bb4d9b7792a6a592c48ad23d450f88b Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Sat, 18 Jun 2022 11:33:14 -0600 Subject: [PATCH 9/9] Run on 22.04 --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 1a869b0..c9c2b94 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,7 +8,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f25b8d4..b78efe0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: