Skip to content

Commit c6fb5e0

Browse files
committed
Actually copy Github workflows from content branch
1 parent 09754c1 commit c6fb5e0

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

.github/workflows/build.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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

.github/workflows/deploy.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
uses: shalzz/[email protected]
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)