Skip to content

Update current feature #64

Update current feature

Update current feature #64

Workflow file for this run

name: Publish website
on:
push:
branches:
- master # Set a branch to deploy
env:
THEME_URL: github.com/McShelby/hugo-theme-relearn
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.126.1'
extended: true
- name: Install yafc
run: sudo apt-get install yafc
- name: Retrieve theme
run: |
hugo mod get -u $THEME_URL
# To use PostCSS, we must install the following modules. See:
# - https://gohugo.io/hugo-pipes/postcss/
# - https://github.com/google/docsy/tree/main#prerequisites
npm install postcss postcss-cli autoprefixer
- name: Build website
run: |
hugo --minify
- name: Ftp site to OVH
run: |
cat <<EOF > "env-creds.sh"
SERVER="ftp.cluster021.hosting.ovh.net"
SERVER_USER="${{ secrets.SERVER_USER }}"
SERVER_PASS="${{ secrets.SERVER_PASS }}"
HTACCESS_USER="${{ secrets.HTACCESS_USER }}"
HTACCESS_PASS="${{ secrets.HTACCESS_PASS }}"
EOF
./sftp.sh