Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0574d08d57 | |||
| 7ce949852f | |||
| bb98b8272f | |||
| ee6889d705 | |||
| 71ff35c7a1 |
@@ -38,12 +38,12 @@ jobs:
|
||||
docker push git.${{ secrets.DOMAIN }}/${{ secrets.REGISTRY_USER }}/testapp:latest
|
||||
|
||||
- name: Deploy to VPS
|
||||
uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
username: ${{ secrets.DEPLOY_USER }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
script: |
|
||||
cd ~/programs/testapp
|
||||
docker compose pull
|
||||
docker compose up -d --remove-orphans
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/key
|
||||
chmod 600 ~/.ssh/key
|
||||
ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
ssh -i ~/.ssh/key \
|
||||
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} \
|
||||
"cd ~/programs/testapp && docker compose pull && docker compose up -d"
|
||||
|
||||
+15
-6
@@ -1,11 +1,20 @@
|
||||
function App() {
|
||||
return (
|
||||
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100vh' }}>
|
||||
<h1>Build wokrs when pushing to dev.</h1>
|
||||
<h1>Now time to try pushing to main and deploy</h1>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
height: '100vh',
|
||||
}}
|
||||
>
|
||||
<h1>Build works when pushing to dev.</h1>
|
||||
<h1>Now time to try pushing to main and deploy.</h1>
|
||||
<h2>Okay, everything works just fine.</h2>
|
||||
<h3> one more</h3>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export default App
|
||||
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user