-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,58 @@ | ||
# disabled workflow | ||
# 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 |