This commit is contained in:
parent
44fb0fb0ad
commit
0613f997db
2 changed files with 28 additions and 18 deletions
28
.forgejo/workflows/main.yml
Normal file
28
.forgejo/workflows/main.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup node
|
||||
uses: https://github.com/actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd src
|
||||
npm ci
|
||||
npx presskit build --output ../out --pretty-links --collapse-menu --clean-build-folder
|
||||
cp .htaccess ../out
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
apt update && apt install -y rsync
|
||||
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
|
||||
echo "${{ secrets.ELLBOT_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
||||
rsync -rv --delete -e 'ssh -o "ProxyCommand cloudflared access ssh --hostname %h" -o "StrictHostKeyChecking=no"' main/_site/ ellbot@ssh.ellpeck.de:/var/www/press
|
|
@ -1,18 +0,0 @@
|
|||
steps:
|
||||
build:
|
||||
image: node:12
|
||||
commands:
|
||||
- cd src
|
||||
- npm install
|
||||
- npx presskit build --output ../out --pretty-links --collapse-menu --clean-build-folder
|
||||
- cp .htaccess ../out
|
||||
deploy:
|
||||
image: debian:latest
|
||||
when:
|
||||
- event: [push, manual]
|
||||
branch: main
|
||||
commands:
|
||||
- rm -rfv /var/www/press/*
|
||||
- cp -rv out/. /var/www/press
|
||||
volumes:
|
||||
- /var/www/press:/var/www/press
|
Loading…
Reference in a new issue