techstack.hadan.de/.gitea/workflows/develop.yml
Stephan Hadan 017ad09ab9
All checks were successful
Preview / build-deploy (push) Successful in 33s
added ntfy to build pipeline
2025-01-26 20:08:10 +01:00

43 lines
1.5 KiB
YAML

name: Preview
on:
push:
branches:
- develop
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
# - run: npm run create:ast
- run: apt-get update && apt-get install -y rsync
- name: Create private key
run: |
echo "${{ secrets.ACT_RUNNER_KEY }}" > /tmp/act_runner_key
chmod 600 /tmp/act_runner_key
- name: rsync public directory
run: |
/usr/bin/rsync -avz --delete -e "ssh -i /tmp/act_runner_key -o StrictHostKeyChecking=no" ${{ gitea.workspace }}/dist/* root@vps03.hadan-it.com:/data/webspace/techstack.preview.hadan.de/
- name: ntfy-success-notifications
uses: https://github.com/niniyas/ntfy-action@master
if: success()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
priority: 4
headers: '${{ secrets.NTFY_HEADERS }}'
tags: +1,partying_face,action,successfully,completed
details: Workflow has been successfully completed!
icon: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Forgejo_logo.svg/512px-Forgejo_logo.svg.png'
image: true
- run: echo "This job's status is ${{ job.status }}."