-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (39 loc) · 1.24 KB
/
pdf.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build and ship PDF
on:
workflow_dispatch
jobs:
Build:
runs-on: ubuntu-latest
container:
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
image: ${{ format('{0}/{1}', 'ghcr.io', github.repository) }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Build PDF
run: make --jobs=2 coolbrisk.pdf
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: coolbriskwalk
path: coolbrisk.pdf
Ship:
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
needs: Build
steps:
- name: Download Artifacts From Build
uses: actions/download-artifact@v3
with:
name: coolbriskwalk
- name: Prepare For Shipping
run: mv -v coolbrisk.pdf brisk.pdf # Preserve current URL (http://stephendavies.org/brisk.pdf)
- name: Ship
uses: appleboy/[email protected]
with:
username: ${{ secrets.SSH_USERNAME }}
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
source: "brisk.pdf"
target: ${{ secrets.SSH_DESTINATION_DIR }}