Skip to content

Commit

Permalink
Apparently workflow should also come from this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavmb committed Aug 18, 2023
1 parent 2a8ca46 commit 573896d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
external_repository: harshavmb/harshavmb.github.io
publish_dir: ./public
## not excluding anything, let .github be there
exclude_assets: '.github'
exclude_assets: ''
user_name: harshavmb
user_email: harshavmb@gmail.com
publish_branch: main
Expand Down
16 changes: 14 additions & 2 deletions workflow-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@ name: CD for harshanu website
on: push
jobs:
deploy:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: Git checkout
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up SSH key
run: |
env
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -p 23 -t rsa ${{ vars.HETZNER_STORAGE_HOST }} >> ~/.ssh/known_hosts
- name: Deploy code to storage box
run: |
rsync -azP --exclude=bin -e "ssh -i $HOME/.ssh/id_rsa -p 23" $(pwd)/${{ env.GITHUB_REPOSITORY }}/* ${{ vars.HETZNER_STORAGE_USER }}@${{ vars.HETZNER_STORAGE_HOST }}:${{ vars.REMOTE_WEBSITE_PATH }}

0 comments on commit 573896d

Please sign in to comment.