Skip to content

Site

Site #532

Workflow file for this run

name: Site
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * 5'
jobs:
Site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Get Hugo and hdl/constraints
run: |
curl -fsSL https://github.com/gohugoio/hugo/releases/download/v0.80.0/hugo_extended_0.80.0_Linux-64bit.tar.gz | sudo tar xzf - -C /usr/local/bin hugo
sudo chmod +x /usr/local/bin/hugo
hugo version
git clone https://github.com/hdl/constraints
python3 constraints/constraints.py content
- name: Build site
run: hugo
- uses: actions/upload-artifact@master
with:
name: site
path: public
- name: Publish site to gh-pages
if: github.event_name != 'pull_request' && github.repository == 'hdl/awesome'
run: |
cd public/
touch .nojekyll
git init
cp ../.git/config ./.git/config
git add .
git config --local user.email "push@gha"
git config --local user.name "GHA"
git commit -a -m "update ${{ github.sha }}"
git push -u origin +HEAD:gh-pages