diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml new file mode 100644 index 00000000..241eb519 --- /dev/null +++ b/.github/workflows/generate.yml @@ -0,0 +1,49 @@ +name: Generate vim help +on: + push: + branches: + - master + workflow_dispatch: + schedule: + - cron: '5 12 * * *' + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: checkout master + uses: actions/checkout@v2 + with: + path: work + - name: Checkout gh-pages + uses: actions/checkout@v2 + with: + path: target + ref: gh-pages + - name: Setup Vim + uses: thinca/action-setup-vim@v1 + with: + vim_version: 'v8.2.0020' + vim_type: 'Vim' + - name: Generate new document + run: | + cd work + # Create html documents + make html + + cd .. + # install + cp work/target/html/doc/*.html target + - name: Commit updated master branch + uses: EndBug/add-and-commit@v7 + with: + cwd: './target' + author_name: '${{ github.actor }}' + author_email: '${{ github.actor }}@users.noreply.github.com' + message: |- + Generated by GitHub workflow ${{ github.run_id }} + + https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + branch: gh-pages + env: + GITHUB_TOKEN: ${{ secrets.VIMDOC_JP_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 62285547..00000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: go -go: 1.7.3 -dist: trusty -sudo: false - -env: - global: - - 'DEPLOY_BRANCH="master"' - - 'DEPLOY_REPO_SLUG="vim-jp/vimdoc-en"' - - 'DEPLOY_USER_NAME="vimdoc-en on travis-ci"' - - 'DEPLOY_USER_EMAIL="vimdoc-en+travis-ci@vim-jp.org"' - -script: - - sh ./tools/install_sshkey_github.sh $encrypted_3ac247a44cc5_key $encrypted_3ac247a44cc5_iv ./tools/ci@vimdoc-en.vim-jp.org.enc ~/.ssh/ci@vimdoc-en.vim-jp.org - - | - if [ "$TRAVIS_BRANCH" = "$DEPLOY_BRANCH" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then - sh ./tools/deploy-gh-pages.sh _gh-pages - fi diff --git a/tools/ci@vimdoc-en.vim-jp.org.enc b/tools/ci@vimdoc-en.vim-jp.org.enc deleted file mode 100644 index cc4f3f69..00000000 Binary files a/tools/ci@vimdoc-en.vim-jp.org.enc and /dev/null differ diff --git a/tools/deploy-gh-pages.sh b/tools/deploy-gh-pages.sh deleted file mode 100755 index 7e770b3f..00000000 --- a/tools/deploy-gh-pages.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -set -e - -dir=$1 ; shift - -# build -make html - -git clone -b gh-pages --depth 1 "git@github.com:${DEPLOY_REPO_SLUG}.git" "$dir" - -# install -cp target/html/doc/*.html "$dir" - -cd "$dir" -git add --all -if ! git diff --quiet HEAD ; then - git config push.default simple - git config user.email "$DEPLOY_USER_EMAIL" - git config user.name "$DEPLOY_USER_NAME" - git commit -m "Generated by Travis JOB $TRAVIS_JOB_NUMBER" -m "https://travis-ci.com/github/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID" - git push -else - echo "No changes" -fi diff --git a/tools/install_sshkey_github.sh b/tools/install_sshkey_github.sh deleted file mode 100755 index 4c76728f..00000000 --- a/tools/install_sshkey_github.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# USAGE: install_sshkey_github.sh {DECRYPT_KEY} {DECRYPT_IV} {ENCRYPTED_SSHKEY_FILE} {DECRYPTED_SSHKEY_FILE} - -set -e - -key=$1 ; shift -iv=$1 ; shift -src=$1 ; shift -dst=$1 ; shift - -echo "Host github.com\n\tStrictHostKeyChecking no\n\tIdentityFile $dst\n" >> ~/.ssh/config -openssl aes-256-cbc -K "$key" -iv "$iv" -in "$src" -d -out "$dst" -chmod 600 "$dst"