Merge pull request #40 from plantinformatics/user-story-3 #15
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: Automated Deploy - documentation website | |
on: | |
push: | |
branches: | |
- main # Trigger on pushes to master branch | |
workflow_dispatch: # Allow manual triggering | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.EC2_SSH_PRIVATE_KEY }} | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
- name: Pull latest changes | |
env: | |
HOST: ${{ secrets.EC2_HOST }} | |
USER: ${{ secrets.EC2_USER }} | |
run: | | |
ssh $USER@$HOST <<EOF | |
cd pretzel-documentation-website-test/ | |
git fetch | |
git pull | |
EOF |