Skip to content

Add hackernews link for ctrl-p-in-docker #27

Add hackernews link for ctrl-p-in-docker

Add hackernews link for ctrl-p-in-docker #27

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Hugo CI & Deploy
on:
push:
branches:
- main
jobs:
build:
name: Build and deploy website
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: cache
uses: actions/cache@v2
with:
path: /tmp/hugo_cache
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-
- name: Build website with Hugo
run: hugo --minify
- name: Deploy website with rsync
uses: burnett01/rsync-deployments@5.2.1
with:
switches: -avzr --quiet --delete
path: public/
remote_path: ${{ secrets.REMOTE_PATH }}
remote_host: ${{ secrets.REMOTE_HOST }}
remote_user: ${{ secrets.REMOTE_USER }}
remote_key: ${{ secrets.REMOTE_KEY }}
- name: Set file permissions
uses: appleboy/ssh-action@v0.1.8
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.REMOTE_KEY }}
script: "sudo chown -R ${{ secrets.REMOTE_USER }}:www-data ${{ secrets.REMOTE_PATH }}"