Build and deploy on master #1353
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: Build and deploy on master | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
schedule: | |
- cron: "00 06 * * *" | |
# 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" | |
build: | |
# 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: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- uses: ./.github/workflows/build_site | |
- name: Add private key | |
shell: bash | |
env: | |
PRIVATE_KEY: ${{ secrets.DEPLOYMENT_PRIVATE_KEY }} | |
run: | | |
mkdir -p /home/runner/.ssh | |
echo "$PRIVATE_KEY" > /home/runner/.ssh/id_ed25519 | |
chmod 600 /home/runner/.ssh/id_ed25519 | |
echo -e "[pratchett.ugent.be]:2222 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIs8YMbO+aiTRlbi7++8CAqzq46zNLMsYAH3ycub6zkCFPKwIsePDlHJhMgTWG54Vwon60UT6FYyrBYbVfAWY1I=\n[pratchett.zeus.gent]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIs8IQpKz24LZuZZ43yEMqelfKmk+3C62+FA15HHZEK6\n" >> ~/.ssh/known_hosts | |
- name: Deploy to production | |
run: "nanoc --env=prod deploy public" |