[Case Study] Corrections on Ridisi case study #6
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-prod | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# - uses: actions/setup-node@v1 | |
# | |
# - run: npm install | |
# - run: npm run build | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.GH_ACTIONS_SSH_PRIVATE_KEY }} | |
name: github-actions # optional | |
known_hosts: placeholder-so-the-action-doesnt-fail | |
if_key_exists: ignore | |
- name: Adding Known Hosts | |
run: ssh-keyscan -H ${{ secrets.GH_ACTIONS_SSH_IP_ADDRESS }} >> ~/.ssh/known_hosts | |
- name: Run Bundle | |
run: bundle install | |
- name: Build the jekyll project | |
run: JEKYLL_ENV=production bundle exec jekyll build | |
- name: output ls | |
run: ls -l | |
# - name: Deploy with rsync | |
# run: rsync -avz ./_site/ ${{ secrets.GH_ACTIONS_SSH_USER }}@${{ secrets.GH_ACTIONS_SSH_HOST }}:${{ secrets.GH_ACTIONS_SSH_DEST_PATH }} |