File tree 2 files changed +72
-0
lines changed
2 files changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+ on :
3
+ push :
4
+ branches : [content]
5
+
6
+ env :
7
+ ZOLA_VERSION : v0.20.0
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
15
+ - uses : actions/checkout@v2
16
+
17
+ - name : Set Git identity
18
+ run : |
19
+ # This is required to run `act` locally (default image doesn't include those).
20
+ # See: https://github.com/nektos/act/issues/107
21
+ apt update && apt install -y git sudo nodejs
22
+ git config --global user.email "[email protected] "
23
+ git config --global user.name "Maxime Buffa"
24
+
25
+ - name : Checkout Zola
26
+ run : curl -s -L https://github.com/getzola/zola/releases/download/$ZOLA_VERSION/zola-$ZOLA_VERSION-x86_64-unknown-linux-gnu.tar.gz | sudo tar xvzf - -C /usr/local/bin
27
+
28
+ - name : Build
29
+ run : |
30
+ cd $GITHUB_WORKSPACE
31
+ zola build
32
+ npm run build
33
+ cp vendor/* public/
34
+
35
+ - name : Bake
36
+ run : |
37
+ cd $GITHUB_WORKSPACE
38
+ git fetch -p
39
+ git checkout master
40
+ rm -rf config.toml content sass templates
41
+ cp -R public/* .
42
+ rm -rf public
43
+ rm -rf tips
44
+ rm -rf tutorials
45
+
46
+ - name : Commit
47
+ run : |
48
+ cd $GITHUB_WORKSPACE
49
+ git add -f .
50
+ git status
51
+ git commit -m "New release"
52
+
53
+ - name : Push
54
+ run : |
55
+ cd $GITHUB_WORKSPACE
56
+ git push origin master
Original file line number Diff line number Diff line change
1
+ name : Deploy
2
+ on :
3
+ push :
4
+ branches : [master]
5
+
6
+ jobs :
7
+ publish :
8
+ name : Publish
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout
12
+ uses : actions/checkout@v4
13
+ - name : Build and deploy
14
+
15
+ env :
16
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments