Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (57 sloc) 1.72 KB
name: Build website using build/build.go
on:
schedule:
- cron: '0 0 1 * *'
push:
paths:
- '*' # Run workflow for all file paths
- 'build/**'
- 'content/**'
- 'static/**'
- 'themes/**'
- '!/docs/*' # Don't run workflow when files are only in the /docs directory
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-18.04
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
env:
advice.detachedHead: false
uses: actions/checkout@master
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Install Hugo
run: |
curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "browser_download_url.*hugo_[^extended].*_Linux-64bit\.deb" | cut -d ":" -f 2,3 | tr -d \" | wget -qi -
package="$(find . -name "*Linux-64bit.deb")"
sudo dpkg -i $package
which hugo
hugo version
rm -rf *.deb
- name: Checkout Master
run: git checkout master
- name: Run Build Program
run: |
cd build/
go run .
- name: Commit Changes
run: |
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config --global user.name "Github Actions"
git add .
git commit -m "New build"
git remote set-url origin https://ldrrp:${{ secrets.PERSONAL }}@github.com/${{ github.repository }}.git
git push origin master
You can’t perform that action at this time.