Merge pull request #62 from mattpopovich/description-tags #23
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" | |
on: | |
push: | |
branches: | |
- main | |
- master | |
paths-ignore: | |
- .gitignore | |
- README.md | |
- LICENSE | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: read # permits an action to list the commits (unsure if necessary for us) | |
# Only one deploy.yml file can run at the same time | |
concurrency: | |
group: "deployment" | |
cancel-in-progress: true | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # for posts's lastmod | |
# submodules: true | |
# If using the 'assets' git submodule from Chirpy Starter, uncomment above | |
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets) | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1 # reads from a '.ruby-version' or '.tools-version' file if 'ruby-version' is omitted | |
bundler-cache: true | |
# TODO: Don't duplicate building the site again? | |
# TOOD: If we have to duplicate, reference the job/steps from build.yml | |
- name: Build site | |
run: | | |
bundle exec jekyll b | |
env: | |
JEKYLL_ENV: "production" | |
- name: Deploy to mattpopovich.com | |
uses: easingthemes/[email protected] | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
REMOTE_HOST: ${{ secrets.HOSTNAME }} | |
REMOTE_USER: ${{ secrets.USERNAME }} | |
ARGS: "-ahv --delete" | |
SOURCE: "_site/" | |
TARGET: ${{ secrets.SERVER_DESTINATION }} | |
SCRIPT_BEFORE: | | |
whoami | |
ls -lah | |
SCRIPT_AFTER: | | |
whoami | |
ls -lah | |
ls -lah mattpopovich.com | |
# run: | | |
# rsync -ahv --delete --dry-run ${{ steps.pages.outputs.base_path }} ${{ secrets.USERNAME }}@${{ secrets.HOSTNAME }}:${{ secrets.SERVER_DESTINATION}} |