Skip to content

githubui.xogames.org #15

githubui.xogames.org

githubui.xogames.org #15

Workflow file for this run

name: githubui.xogames.org
env:
PROJECT: githubui
HOST: xogames.org
SITES_ENABLED: '~/sites-enabled/'
PUBLIC_HTML: '~/githubui.xogames.org/'
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup SSH key
run: |
echo "${{ secrets.DEPLOYMENT_USER_KEY }}" > deploy_key.pem
chmod 600 deploy_key.pem
- name: Create target directories if they don't exist
run: |
ssh -i deploy_key.pem -o StrictHostKeyChecking=no ${{ secrets.USERNAME }}@${{ env.HOST }} "mkdir -p ${{ env.PUBLIC_HTML }}"
- name: Copy build files via SSH
run: |
scp -i deploy_key.pem -r build/* ${{ secrets.USERNAME }}@${{ env.HOST }}:${{ env.PUBLIC_HTML }}
scp -i deploy_key.pem githubui.caddy ${{ secrets.USERNAME }}@${{ env.HOST }}:${{ env.SITES_ENABLED }}