Skip to content

Testing

Testing #32

name: Build and Push Content
on:
push:
branches: [ master ]
paths:
- "GuildWarsPartySearch.FrontEnd/**"
- ".github/workflows/content-deploy.yaml"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Install sshpass
run: sudo apt-get update && sudo apt-get install -y sshpass
- name: Archive content
run: tar -cvf Content.tar GuildWarsPartySearch.FrontEnd/Content
- name: Deploy content to host
shell: pwsh
run: |
echo "Uploading content"
sshpass -p "${{ secrets.HOST_PASS }}" scp -o StrictHostKeyChecking=no Content.tar ${{ secrets.HOST_USER }}@${{ secrets.HOST_ADDRESS }}:/home/guildwarspartysearch/staging
#echo "Extracting content"
#sshpass -p "${{ secrets.HOST_PASS }}" ssh -o StrictHostKeyChecking=no ${{ secrets.HOST_USER }}@${{ secrets.HOST_ADDRESS }} "tar -xvf /home/guildwarspartysearch/staging/Content.tar -c /home/guildwarspartysearch/staging/Content"
# echo "Copying content into container"
# sshpass -p "${{ secrets.HOST_PASS }}" ssh -o StrictHostKeyChecking=no ${{ secrets.HOST_USER }}@${{ secrets.HOST_ADDRESS }} "docker cp /home/guildwarspartysearch/staging/Content/ partysearch:/app/Content/"
# echo "Cleaning up"
# sshpass -p "${{ secrets.HOST_PASS }}" ssh -o StrictHostKeyChecking=no ${{ secrets.HOST_USER }}@${{ secrets.HOST_ADDRESS }} "rm -rf /home/guildwarspartysearch/staging/Content"