Merge pull request #360 from use-compose/dev #97
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: Pull latest version | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
pull-latest-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install SSH Key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_KEY }} | |
known_hosts: unnecessary | |
- name: Set Up SSH | |
uses: webfactory/ssh-agent@v0.9.1 | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} # Your SSH key for connecting to servers | |
- name: Pull latest version | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
key: ${{ secrets.SSH_KEY }} | |
username: ${{ secrets.SSH_USERNAME }} | |
script: | | |
echo $HOME/sites/libs/compose | |
cd $HOME/sites/libs/compose | |
ls -la | |
git status | |
if [ -d '.git' ]; then | |
git pull origin main | |
else | |
git clone -b main git@github.com:gamma-ui/compose.git . | |
fi |