Switch from Travis CI to GitHub Actions for continuous integration (#8)

This commit is contained in:
Hugo Locurcio
2020-11-04 16:00:43 +01:00
committed by GitHub
parent bfd29fbbf1
commit 09d773e115
3 changed files with 42 additions and 29 deletions

6
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

36
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Continuous integration
on:
push:
schedule:
# Every day at midnight (UTC).
# This keeps the list of proposals fresh.
- cron: '0 0 * * *'
jobs:
deploy:
name: Build and deploy to GitHub Pages
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Generate class reference table and build website
env:
HUGO_VERSION: '0.76.3'
run: |
curl -LO "https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz"
tar xf "hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" hugo
sudo mv hugo /usr/local/bin/
./build.sh
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The branch the action should deploy to.
BRANCH: gh-pages
# The folder the action should deploy.
FOLDER: public
# Artifacts are large, don't keep the branch's history
SINGLE_COMMIT: true

View File

@@ -1,29 +0,0 @@
os: linux
dist: bionic
# Python is required to run `doc_status.py`.
language: python
python:
- 3.8
env:
- HUGO_VERSION="0.76.3"
install:
- curl -LO "https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz"
- tar xf "hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" hugo
- sudo mv hugo /usr/local/bin/
script:
- ./build.sh
deploy:
provider: pages
skip_cleanup: true
local_dir: public
token: $GITHUB_TOKEN
target_branch: gh-pages
# Only deploy from the `master` branch.
on:
branch: master