Skip to content

Commit

Permalink
Enable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aliorhun authored Jul 29, 2023
1 parent 4ebfbd2 commit fc39bb8
Showing 1 changed file with 58 additions and 1 deletion.
59 changes: 58 additions & 1 deletion .github/workflows/main.yml
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

0 comments on commit fc39bb8

Please sign in to comment.