move to github actions

This commit is contained in:
avitex 2021-01-21 00:25:44 +11:00
parent 0a2ffbf403
commit 31431644d2
Signed by: avitex
GPG Key ID: 38C76CBF3749D62C
2 changed files with 17 additions and 18 deletions

17
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,17 @@
on:
push:
branches:
- source
jobs:
build_and_deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/source'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and deploy
uses: shalzz/zola-deploy-action@v0.12.0
env:
PAGES_BRANCH: master
BUILD_DIR: .
TOKEN: ${{ secrets.TOKEN }}

View File

@ -1,18 +0,0 @@
dist: bionic
language: minimal
before_script:
# Download and unzip the zola executable
- curl -s -L https://github.com/getzola/zola/releases/download/v0.10.1/zola-v0.10.1-x86_64-unknown-linux-gnu.tar.gz | sudo tar xvzf - -C /usr/local/bin
script:
- zola check && zola build
after_success: |
[ $TRAVIS_BRANCH = source ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
zola check &&
zola build &&
sudo pip install ghp-import &&
ghp-import -m "build ${TRAVIS_COMMIT}" -c 1bit.pw -n public -b master &&
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git master