-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:shensquared/gradML
- Loading branch information
Showing
6 changed files
with
72 additions
and
102 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Execute Commands on Remote Server | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.PUBLIC_KEY }}" > ~/.ssh/id_rsa.pub | ||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa.pub | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh -p ${{ secrets.REMOTE_PORT }} -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }} << 'EOF' | ||
export PATH="/home/shensquared/.rbenv/bin:$PATH" | ||
eval "$(rbenv init -)" | ||
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then | ||
cd /home/shensquared/gradML | ||
echo "Running on main branch" | ||
git pull origin main | ||
bundle exec jekyll build | ||
elif [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then | ||
cd /home/shensquared/gradML_dev | ||
echo "Running on dev branch" | ||
git pull origin dev | ||
bundle exec jekyll build --config _config.yml,_config_dev.yml | ||
fi | ||
EOF |
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
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
This file was deleted.
Oops, something went wrong.
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
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