Last active
December 16, 2020 20:05
-
-
Save hoff2/e322ed64e05f13b31ea1eb3b8c4fd87f to your computer and use it in GitHub Desktop.
actions workflow to build a jekyll site and update it somewhere over rsync/ssh
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: Build and deploy Jekyll site to wherever | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-upload: | |
runs-on: ubuntu-16.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-ruby@v1 | |
with: | |
ruby-version: '2.6' | |
- uses: actions/cache@v2 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Bundle install | |
run: | | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- run: bundle exec jekyll b | |
- uses: burnett01/rsync-deployments@4.1 | |
with: | |
switches: -r --exclude='/files' | |
path: _site/ | |
remote_path: $REMOTE_PATH | |
remote_host: $HOST | |
remote_user: $USER | |
remote_key: ${{ secrets.DEPLOY_KEY }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment