[static] Add keymap PDF for easy linking #26
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 is a basic workflow to help you get started with Actions | |
name: Deploy | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
Deploy_to_Production: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Cloning repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Get Zola | |
run: | | |
curl -L https://github.com/getzola/zola/releases/download/$ZOLA_VERSION/zola-${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz > zola.tar.gz | |
tar xzvf zola.tar.gz | |
- name: Build project with Zola | |
run: | | |
./zola build | |
- name: Install SSH private key | |
run: | | |
install -m 600 -D /dev/null ~/.ssh/id_ed25519 | |
echo "${{ secrets.DEPLOY_SSH_PRIV_KEY }}" > ~/.ssh/id_ed25519 | |
- name: Test SSH connection to production server | |
run: | | |
echo "${SSH_KNOWN_HOSTS}" | tee ~/.ssh/known_hosts | |
ssh github@${DEST_HOST} whoami | |
- name: Deploy to production | |
run: | | |
rsync -avz --delete --safe-links public/ github@${DEST_HOST}:${DEST_DIR} | |
ssh github@${DEST_HOST} <<EOF | |
cd /opt/repos/rachelsfba-infra | |
sudo docker compose exec -it web nginx -s reload | |
EOF | |
env: | |
# Specify the zola version you want to use here | |
ZOLA_VERSION: v0.19.2 | |
# Destination hostname | |
DEST_HOST: rachelsfba.com | |
# Destination directory | |
DEST_DIR: /opt/repos/rachelsfba.com | |
# ssh_known_hosts file | |
SSH_KNOWN_HOSTS: |- | |
rachelsfba.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDSmbIQ3qUms0ZRFGqJpVEk1jfViVFHrcLSinzPuzhEH | |
# vim: set ts=4 sw=2 tw=88 et : |