Add deploy action
This commit is contained in:
parent
91d529682d
commit
c250bdf00f
2 changed files with 24 additions and 1 deletions
22
.forgejo/workflows/deploy.yml
Normal file
22
.forgejo/workflows/deploy.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: alpine:latest
|
||||
steps:
|
||||
- name: Install SSH
|
||||
run: apk --no-cache add openssh-client
|
||||
shell: sh
|
||||
|
||||
- name: Configure SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
chmod 700 ~/.ssh/
|
||||
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/staging.key
|
||||
chmod 600 ~/.ssh/staging.key
|
||||
shell: sh
|
||||
|
||||
- name: Test SSH
|
||||
run: ssh -i ~/.ssh/staging.key -o StrictHostKeyChecking=no hadeed@hadeedahmad.xyz 'cd nginx/www; git pull'
|
||||
shell: sh
|
|
@ -3,6 +3,7 @@
|
|||
<title>Home - Hadeed Ahmad</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Welcome to my website</p>
|
||||
<p>Welcome to my website!</p>
|
||||
<p>There's not much right now, but soon this will be quite nice.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue