looks like it is not that simple to get gh actions to trust sshfp #4
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: Build and Deploy to trinity | |
| on: | |
| push: | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.1' | |
| - name: Install dependencies | |
| run: bundle install | |
| - name: Build site | |
| run: bundle exec jekyll build | |
| - name: Set up SSH | |
| uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }} | |
| - name: Add remote host to known_hosts | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "trinity.hacklab.fi ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEbuUzPWSkuCC/iAE2KgxnCO22+9MLdTfTGLiVFOC6gm" >> ~/.ssh/known_hosts | |
| - name: Deploy to server via rsync | |
| run: | | |
| rsync -avz --delete _site/ [email protected]:/var/www/hacklab.fi/ | |