Skip to content

Commit

Permalink
Deploy to d120.de on main push
Browse files Browse the repository at this point in the history
  • Loading branch information
Oshgnacknak committed Oct 1, 2023
1 parent 77bff7c commit 8661dd6
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This is a basic workflow to help you get started with Actions

name: Build

# Controls when the workflow will run
Expand Down Expand Up @@ -37,7 +35,7 @@ jobs:
texhash --verbose
# 3. Build the documents
- name: "Build the documents"
- name: "Build the documents (fake for now)"
run: |
make -j $(nproc) -C lecture
mv lecture/pdfout pdfout
Expand Down Expand Up @@ -69,3 +67,31 @@ jobs:
# fail_on_unmatched_files: true
# draft: false
# prerelease: false

deploy:
if: ${{ github.event_name == 'push' }}
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: build_latex
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_SECRET_KEY }}
known_hosts: "just-a-placeholder-so-we-dont-get-errors"

- name: Adding Known Hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -H login.d120.de > ~/.ssh/known_hosts
# save the pdf file from the previous workflow
- name: Save pdf file
uses: actions/download-artifact@v3
with:
path: .
name: Vorkurs-Folien

- name: Deploy with rsync
run: rsync -avz * ${{ secrets.SSH_USER }}@login.d120.de:public_html

0 comments on commit 8661dd6

Please sign in to comment.