Skip to content

Commit 086ca0f

Browse files
committed
feat(ci): Push to dedicated server
1 parent b04608a commit 086ca0f

1 file changed

Lines changed: 22 additions & 16 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,21 +86,27 @@ jobs:
8686
# env:
8787
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
8888

89-
# dedi_deploy:
90-
# name: Dedi Deploy
91-
# runs-on: ubuntu-latest
92-
# needs: [build]
93-
# if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
89+
dedi_deploy:
90+
name: Dedi Deploy
91+
runs-on: ubuntu-latest
92+
needs: [build]
93+
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
9494

95-
# steps:
96-
# - name: Checkout repo
97-
# uses: actions/checkout@v2
95+
steps:
96+
- name: Tailscale
97+
uses: tailscale/github-action@v4
98+
with:
99+
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
100+
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
101+
tags: tag:ci
102+
ping: octohost
98103

99-
# - name: Download image
100-
# uses: actions/download-artifact@v4
101-
# with:
102-
# name: image
103-
# path: /tmp
104-
105-
# - name: 'Load image'
106-
# run: docker load --input /tmp/image.tar
104+
- name: Create SSH key
105+
run: |
106+
install -m 600 -D /dev/null ~/.ssh/id_ed25519
107+
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
108+
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
109+
110+
- name: Deploy to dedicated server
111+
run: |
112+
ssh -p 6972 restarter@octohost

0 commit comments

Comments
 (0)