Fix Ascalon naming #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: cd GuildWarsPartySearch.FrontEnd && tar -cvf Content.tar Content | |
- name: Deploy content to host | |
shell: pwsh | |
run: | | |
echo "Uploading content" | |
sshpass -p "${{ secrets.HOST_PASS }}" scp -o StrictHostKeyChecking=no GuildWarsPartySearch.FrontEnd/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" | |
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" | |
echo "Cleaning up" | |
sshpass -p "${{ secrets.HOST_PASS }}" ssh -o StrictHostKeyChecking=no ${{ secrets.HOST_USER }}@${{ secrets.HOST_ADDRESS }} "rm -rf /home/guildwarspartysearch/staging/Content && rm -f /home/guildwarspartysearch/staging/Content.tar" |