Update flatpak.yml #3
This file contains hidden or 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: Deploy flatpak to self-hosted repository | |
on: [push] | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up SSH key | |
uses: webfactory/ssh-agent@v0.5.3 | |
with: | |
ssh-private-key: ${{ secrets.SERVER_SSH_KEY }} | |
- name: Deploy to Server | |
run: | | |
ssh -o StrictHostKeyChecking=no ${{ secrets.USERNAME }}@repo.tkmm.org << 'EOF' | |
sudo apt update | |
sudo apt upgrade -y | |
sudo apt install -y jq xmlstarlet flatpak flatpak-builder | |
rm -rf ~/flathub | |
git clone git@github.com:TKMM-Team/flathub.git --branch tkmm-pr | |
cd ~/flathub | |
bash update_metadata.sh | |
flatpak-builder --user --repo=/var/www/html/repo --install-deps-from=flathub build io.github.tkmm_team.tkmm.yml | |
flatpak build-export /var/www/html/repo build | |
flatpak build-update-repo --generate-static-deltas /var/www/html/repo | |
EOF | |
env: | |
USERNAME: ${{ secrets.USERNAME }} |