From 95918cda8814aad62efbd99e9aa4f51353d38d03 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Fri, 30 Apr 2021 23:36:56 +0200 Subject: [PATCH] Move website generation to GitHub Actions --- .github/deploy.sh | 39 ------------------------------------ .github/deploy_key.enc | Bin 400 -> 0 bytes .github/deploy_key.pub | 1 - .github/website-exclude | 12 ----------- .github/workflows/pages.yml | 31 ++++++++++++++++++++++++++++ .travis.yml | 8 -------- 6 files changed, 31 insertions(+), 60 deletions(-) delete mode 100755 .github/deploy.sh delete mode 100644 .github/deploy_key.enc delete mode 100644 .github/deploy_key.pub delete mode 100644 .github/website-exclude create mode 100644 .github/workflows/pages.yml diff --git a/.github/deploy.sh b/.github/deploy.sh deleted file mode 100755 index 5b9be9885..000000000 --- a/.github/deploy.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -set -e - -P="$(mktemp -d)" -mkdir "$P/git" "$P/out" - -if [ "$encrypted_1671ba5f199a_key" ] -then - eval "$(ssh-agent -s)" - openssl aes-256-cbc -K "$encrypted_1671ba5f199a_key" \ - -iv "$encrypted_1671ba5f199a_iv" \ - -in .github/deploy_key.enc -out .github/deploy_key -d - chmod 600 .github/deploy_key - ssh-add .github/deploy_key - - pip install git+https://github.com/spanezz/staticsite.git@v1.2 -fi - -git clone --depth=10 --branch=gh-pages "git@github.com:${TRAVIS_REPO_SLUG}.git" "$P/git" - -rm -Rfv dosage.egg-info -ssite build --output "$P/out" - -rsync -r --del --verbose --cvs-exclude --exclude-from .github/website-exclude \ - "$P/out/" "$P/git" - -cd "$P/git" - -git config user.email 'nobody@23.gs' -git config user.name 'Travis-CI Website Bot' -git config push.default simple - -git add -A . -if [ "$TRAVIS_COMMIT" ] -then - git commit -a -m "Update website from commit $TRAVIS_COMMIT" || true - git push origin HEAD:gh-pages -fi - diff --git a/.github/deploy_key.enc b/.github/deploy_key.enc deleted file mode 100644 index f7508de395162e326904c8cc73f4bcc9a3ff4844..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcmV;B0dM{vb?0fV6*SBgHaKq!%4|U<#xA>Ktk^e7*txQGJ%^n6)R5aI+W>$fl8gX6 zZN=G!02??PIgR^}vYp0d-N| zepSIcUrgz|LW6?1$NB;BN!BIm{Ajms&Y)_1I2(CJ2Wh5?vLZkjwkD2N0jTtaVp}d( z6dH=N{--4l#AozOU6jc}Bh|cRb={4xoM%cBaY~~d)Z>wu%F*E+*GqBL;GzHPeB9_q zYsBjc>`GKmfOWpEccLL>>>)4qX*-hAV(O~K9nCSKwFtFQNQ`CO| diff --git a/.github/deploy_key.pub b/.github/deploy_key.pub deleted file mode 100644 index 90dd5482c..000000000 --- a/.github/deploy_key.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG/I1J2fVYFzxQP7cZK32kI28cv94NH0xdq08OoIfwpz website-autodeploy diff --git a/.github/website-exclude b/.github/website-exclude deleted file mode 100644 index 79e9639b4..000000000 --- a/.github/website-exclude +++ /dev/null @@ -1,12 +0,0 @@ -CNAME -Jenkinsfile -build -cc-test-reporter -coverage -dist -dosage -dosagelib -scripts -setup.cfg -setup.py -tests diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 000000000..2c95031c5 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,31 @@ +name: GitHub Pages + +on: + - push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 10 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Build + run: | + pip install git+https://github.com/spanezz/staticsite.git@v1.2 + ssite build --output public + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + cname: dosage.rocks + github_token: ${{ secrets.GITHUB_TOKEN }} + exclude_assets: 'Jenkinsfile,dosagelib,scripts,setup.*,tests,*.ini' diff --git a/.travis.yml b/.travis.yml index c089adf22..10c800ba3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,11 +30,3 @@ notifications: - "chat.freenode.net#dosage" use_notice: true skip_join: true -# Push site to gh-pages branch -deploy: - - provider: script - skip_cleanup: true - script: .github/deploy.sh - on: - branch: master - python: 3.9