This commit is contained in:
35
.gitea/workflows/deploy.yml
Normal file
35
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Deploy main page
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master, main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: [ self-hosted ]
|
||||||
|
container:
|
||||||
|
image: node:24
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up SSH
|
||||||
|
run: |
|
||||||
|
mkdir -p /home/node/.ssh
|
||||||
|
echo "$SSH_PRIVATE_KEY" > /home/node/.ssh/dokku-deploy
|
||||||
|
chmod 600 /home/node/.ssh/dokku-deploy
|
||||||
|
ssh-keyscan -H 192.168.1.46 >> /home/node/.ssh/known_hosts
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.DOKKU_DEPLOY_KEY }}
|
||||||
|
|
||||||
|
- name: Deploy to Dokku
|
||||||
|
env:
|
||||||
|
GIT_SSH_COMMAND: 'ssh -o UserKnownHostsFile=/home/node/.ssh/known_hosts'
|
||||||
|
run: |
|
||||||
|
eval $(ssh-agent -s)
|
||||||
|
ssh-add /home/node/.ssh/dokku-deploy
|
||||||
|
git remote add dokku dokku@192.168.1.46:main-page
|
||||||
|
git push dokku master --force
|
11
.gitignore
vendored
Normal file
11
.gitignore
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/tmp
|
||||||
|
/out-tsc
|
||||||
|
|
||||||
|
/node_modules
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
/.pnp
|
||||||
|
.pnp.js
|
||||||
|
|
||||||
|
.vscode/*
|
Reference in New Issue
Block a user