This commit is contained in:
46
.gitea/workflows/deploy.yaml
Normal file
46
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
HUGO_VERSION: 0.160.1
|
||||
DEPLOY_DIR: /var/www/davideisinger.com
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y curl imagemagick rsync ruby-full wget
|
||||
wget --quiet https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
|
||||
apt-get install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb
|
||||
gem install bundler
|
||||
|
||||
- name: Restore secret key
|
||||
env:
|
||||
SECRET_KEY: ${{ secrets.SECRET_KEY }}
|
||||
run: |
|
||||
printf '%s' "$SECRET_KEY" > secret.key
|
||||
|
||||
- name: Verify RSS template diff
|
||||
run: |
|
||||
curl -s https://raw.githubusercontent.com/gohugoio/hugo/refs/tags/v${HUGO_VERSION}/tpl/tplimpl/embedded/templates/rss.xml \
|
||||
| diff - ./themes/v2/layouts/_default/rss.xml \
|
||||
| wc -l \
|
||||
| grep 7
|
||||
|
||||
- name: Build site
|
||||
run: ./bin/build
|
||||
|
||||
- name: Deploy site
|
||||
run: ./bin/deploy-local "${DEPLOY_DIR}"
|
||||
Reference in New Issue
Block a user