homepage/.forgejo/workflows/deploy.yaml

39 lines
1.1 KiB
YAML
Raw Normal View History

2024-02-08 11:58:16 +01:00
on:
push:
tags:
- 'v*'
2024-02-07 23:23:09 +01:00
jobs:
build:
2024-02-07 23:36:17 +01:00
runs-on: docker
2024-02-07 23:31:15 +01:00
container:
2024-03-16 18:35:29 +01:00
image: node:21-bullseye # Required by actions/checkout and actions/upload-artifact
2024-02-07 23:23:09 +01:00
steps:
2024-03-16 18:35:24 +01:00
- uses: actions/checkout@v4
2024-02-07 23:36:17 +01:00
- name: Install dependencies
run: npm install
- name: Build
run: npx @11ty/eleventy
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
deploy:
needs: [build]
2024-02-07 23:44:36 +01:00
runs-on: docker
container:
2024-03-16 18:35:29 +01:00
image: node:21-bullseye # Required by actions/download-artifact
2024-02-07 23:36:17 +01:00
steps:
- uses: actions/download-artifact@v3
with:
name: dist
2024-02-08 11:08:53 +01:00
- name: rsync deployment
2024-02-21 13:49:37 +01:00
uses: https://git.archive.hostux.fr/Hostux/rsync-deployments@6.0.0
2024-02-08 11:08:53 +01:00
with:
switches: -az --no-o --no-g --no-devices --no-specials --delete --progress --checksum
path: .
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}