hotfix: try to serve PRs hot
This commit is contained in:
parent
2755a7eebf
commit
52a206ceca
1 changed files with 42 additions and 0 deletions
42
.forgejo/workflows/deploy-hot.yml
Normal file
42
.forgejo/workflows/deploy-hot.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: Build and Deploy hot PRs
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
|
# Allow one concurrent deployment
|
||||||
|
concurrency:
|
||||||
|
group: "warm-pages"
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: forgejo.event.label.name == 'serve-hot'
|
||||||
|
runs-on: docker
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9.12.2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: pnpm build
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
eval $(ssh-agent -s)
|
||||||
|
echo "$SSH_PRIVATE_KEY" | ssh-add -
|
||||||
|
apt update && apt install -y rsync
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
ssh-keyscan matrix.toplap.org > ~/.ssh/known_hosts
|
||||||
|
rsync -atv --delete --delete-after --progress \
|
||||||
|
./website/dist/ \
|
||||||
|
strudel@matrix.toplap.org:/home/strudel.cc/deploy/pr-${{ forgejo.event.pull_request.number }}.strudel.cc
|
||||||
Loading…
Add table
Add a link
Reference in a new issue