add build and deploy actions
Some checks failed
Build access-web-migration / Build-And-Push (push) Failing after 38s
Some checks failed
Build access-web-migration / Build-And-Push (push) Failing after 38s
This commit is contained in:
28
.gitea/workflows/deploy.yaml
Normal file
28
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Deploy Pun App
|
||||
|
||||
env:
|
||||
CONTAINER_NAME: pun-app
|
||||
IMAGE_NAME: 'deltreey/pun-app'
|
||||
|
||||
on: release
|
||||
|
||||
jobs:
|
||||
Deploy:
|
||||
runs-on: full
|
||||
steps:
|
||||
- name: Configure SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "${{secrets.SSH_KEY}}" > ~/.ssh/repo.key
|
||||
chmod 600 ~/.ssh/repo.key
|
||||
cat >>~/.ssh/config <<END
|
||||
Host florida
|
||||
HostName 192.168.111.206
|
||||
User ${{secrets.SSH_USER}}
|
||||
IdentityFile ~/.ssh/repo.key
|
||||
StrictHostKeyChecking no
|
||||
END
|
||||
- name: Update Test Site
|
||||
env:
|
||||
RUN_ARGS: ""
|
||||
run: ssh florida "docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_PASSWORD}} gitea.area-51-x.com && docker container stop ${CONTAINER_NAME}; docker container rm ${CONTAINER_NAME}; docker pull gitea.area-51-x.com/${IMAGE_NAME}:latest && docker run -d ${RUN_ARGS}--name ${CONTAINER_NAME} gitea.area-51-x.com/${IMAGE_NAME}:latest; docker logout gitea.area-51-x.com"
|
||||
Reference in New Issue
Block a user