Skip to content

dir path

dir path #144

Workflow file for this run

name: Hugo pages
on:
push:
branches:
- main # Set a branch to deploy
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Web Repo
uses: actions/checkout@v2
with:
repository: davidgs/DavidgsWeb
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
path: ./DavidgsWeb
# - name: Checkout Translate
# uses: actions/checkout@v2
# with:
# repository: davidgs/Translator
# path: ./translate
- name: cleanup
run: mkdir /home/runner/work/DavidgsWeb/DavidgsWeb/public; chmod -R a+w /home/runner/work/DavidgsWeb/DavidgsWeb/public; ls -RAGl /home/runner/work/DavidgsWeb/DavidgsWeb/public; ls -RAGl /home/runner/work/DavidgsWeb/DavidgsWeb/DavidgsWeb/public/
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.154.5'
extended: true
- name: Build
run: rm -f /home/runner/work/DavidgsWeb/DavidgsWeb/DavidgsWeb/public/sitemap.xml; cd DavidgsWeb; hugo mod get; hugo mod npm pack; npm install; hugo --minify
- name: rsync deployments
uses: burnett01/rsync-deployments@7.0.1
with:
switches: -avzr
path: ./DavidgsWeb/public/
remote_path: ${{ secrets.REMOTE_PATH }}
remote_host: ${{ secrets.SSH_HOST }}
remote_port: ${{ secrets.SSH_PORT }}
remote_user: ${{ secrets.SSH_USER }}
remote_key: ${{ secrets.WEBSITE_DEPLOY_KEY }}
remote_key_pass: ${{ secrets.DEPLOY_KEY_PASS }}