gh-pages #20
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: Deploy to dcetl | |
on: | |
push: | |
branches: ["gh-pages"] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
gh-pages | |
- name: Add to known_hosts | |
run: mkdir -p ~/.ssh/ && ssh-keyscan -H ${{ secrets.DCETL_HOST }} > ~/.ssh/known_hosts | |
- name: Use SSH Key | |
run: echo "${{ secrets.DCETL_PRIVATE_KEY }}" > dcetl.pem | |
- name: Set perms | |
run: chmod 0400 dcetl.pem && chmod 0600 ~/.ssh/known_hosts | |
- name: Deploy via scp | |
run: scp -oHostKeyAlgorithms=+ssh-rsa -r -i dcetl.pem gh-pages index.html ${{ secrets.DCETL_USER }}@${{ secrets.DCETL_HOST }}:${{ secrets.DCETL_PATH }} |