Skip to content

Add files via upload #38

Add files via upload

Add files via upload #38

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ development ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup Hugo
run: |
[ ! -f ./hugo_extended_0.92.1_Linux-64bit.deb ] && wget https://github.com/gohugoio/hugo/releases/download/v0.92.1/hugo_extended_0.92.1_Linux-64bit.deb
sudo dpkg -i hugo_extended_0.92.1_Linux-64bit.deb
# cd hugo
# echo | hugo env
- name: Build
run: |
cd hugo
hugo --minify
# Runs a set of commands using the runners shell
- name: Replace /docs/ with hugo/public/
run: |
echo --- ls Before ---
pwd
ls
mkdir -p docs
rm -rf ./docs/*
mv -f ./hugo/public/* ./docs/ 2> /dev/null
echo --- ./hugo/public ---
ls ./hugo/public/
echo --- ./docs/ ---
ls ./docs/
- name: Git
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
git remote set-url origin https://x-access-token:${{ secrets.api_token }}@github.com/${{ github.repository }}.git
git fetch
git remote show origin
git add .
git commit -m "Publish Automatic Build"
git push origin development