tangled
alpha
login
or
join now
witchcraft.systems
/
pds-dash
15
fork
atom
this repo has no description
15
fork
atom
overview
issues
pulls
pipelines
CI/CD
astrra.space
10 months ago
7d850f0a
686ef007
verified
This commit was signed with the committer's
known signature
.
astrra.space
SSH Key Fingerprint:
SHA256:jQDNS75/33T59Ey4yAzrUPP/5YQaXEetsW8hwUae+ag=
+58
1 changed file
expand all
collapse all
unified
split
.forgejo
workflows
deploy.yaml
+58
.forgejo/workflows/deploy.yaml
···
1
1
+
name: Deploy
2
2
+
3
3
+
on:
4
4
+
push:
5
5
+
branches:
6
6
+
- main
7
7
+
- astra/ci
8
8
+
9
9
+
jobs:
10
10
+
deploy:
11
11
+
name: Deploy
12
12
+
runs-on: ubuntu-latest
13
13
+
14
14
+
steps:
15
15
+
- name: Checkout repo
16
16
+
uses: actions/checkout@v4
17
17
+
18
18
+
- name: Setup Node.js
19
19
+
uses: actions/setup-node@v3
20
20
+
with:
21
21
+
node-version: '20'
22
22
+
23
23
+
- name: Setup Deno
24
24
+
uses: https://github.com/denoland/setup-deno@v2
25
25
+
26
26
+
- name: Install dependencies
27
27
+
run: deno install
28
28
+
29
29
+
- name: Build project
30
30
+
run: deno task build
31
31
+
32
32
+
- name: Setup SSH
33
33
+
run: |
34
34
+
mkdir -p ~/.ssh
35
35
+
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
36
36
+
chmod 600 ~/.ssh/id_ed25519
37
37
+
cat > ~/.ssh/config << EOF
38
38
+
Host deploy
39
39
+
HostName ${{ vars.SERVER_HOST }}
40
40
+
User ${{ vars.SERVER_USER }}
41
41
+
IdentityFile ~/.ssh/id_ed25519
42
42
+
StrictHostKeyChecking accept-new
43
43
+
BatchMode yes
44
44
+
PasswordAuthentication no
45
45
+
PubkeyAuthentication yes
46
46
+
EOF
47
47
+
chmod 600 ~/.ssh/config
48
48
+
ssh-keyscan -H ${{ vars.SERVER_HOST }} >> ~/.ssh/known_hosts
49
49
+
echo "Deploying to ${{ vars.SERVER_HOST }} as ${{ vars.SERVER_USER }} to /var/www/pds/${{ github.ref_name }}"
50
50
+
51
51
+
- name: Debug SSH Connection
52
52
+
run: ssh -v deploy echo "SSH Connection Successful"
53
53
+
54
54
+
- name: Create folder if not exists
55
55
+
run: ssh deploy "mkdir -p /var/www/pds/${{ github.ref_name }}"
56
56
+
57
57
+
- name: Deploy via SCP
58
58
+
run: scp -r ./dist/* deploy:/var/www/pds/${{ github.ref_name }}