-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (56 loc) · 1.4 KB
/
Deploy.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build and Deploy
on:
push:
branches:
- main
- master
jobs:
build:
runs-on: ubuntu-latest # could be anything now
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Julia
uses: julia-actions/setup-julia@v1
with:
version: '1' # Latest stable Julia release.
- run: julia -e '
using Pkg; Pkg.add("Franklin"); using Franklin;
optimize(prepath="test-fpush",minify=false,prerender=false)'
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: franklin-site
path: __site
deploy:
concurrency: ci-${{ github.ref }}
needs: [build]
runs-on: ubuntu-latest # or mac
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Git setup
run: |
git config user.name "GABot"
git config user.email "<>"
- name: Checkout preview
run: |
git checkout -B gh-preview
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: franklin-site
path: __tmp__site
- name: Copy content
run: |
cp -a __tmp__site/. .
- name: Remove tmp dir
run: |
rm -rf __tmp__site
- name: Push
run: |
git add -A && git commit -am "update" && git push -u origin gh-preview