Skip to content

Merge pull request #1 from j-catania/dependabot/github_actions/action… #85

Merge pull request #1 from j-catania/dependabot/github_actions/action…

Merge pull request #1 from j-catania/dependabot/github_actions/action… #85

Workflow file for this run

name: Hugo CI
on:
push:
branches: [ main ]
tags: [ 'v*' ]
jobs:
staging:
name: Deploy to staging
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/main')
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.111.3'
- name: Build
run: hugo --baseURL ${{ secrets.HUGO_STAGING_BASEURL }} --destination blog-staging -D
- name: copy file via ssh password
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOSTNAME }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
source: "blog-staging"
target: ${{ secrets.SSH_WORKDIR }}
production:
name: Deploy to production
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.111.3'
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
cname: blog.jcatania.io