add deploy.yaml
This commit is contained in:
parent
69ac493ee8
commit
97371412a0
1 changed files with 21 additions and 0 deletions
21
.forgejo/workflows/deploy.yaml
Normal file
21
.forgejo/workflows/deploy.yaml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
name: Deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-full-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: task build
|
||||
- name: Setup SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/key
|
||||
chmod 600 ~/.ssh/key
|
||||
- name: Deploy
|
||||
run: |
|
||||
scp -o StrictHostKeyChecking=no -i ~/.ssh/key -r ./dist/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.DATA_PATH }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue