-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (52 loc) · 1.53 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
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: 'Checkout'
uses: actions/checkout@main
- uses: actions/setup-node@v4
with:
node-version: 20
- run: |
apt-get update && apt-get install -y wget git
- run: |
wget -q -O - \
"https://github.com/getzola/zola/releases/download/v0.19.1/zola-v0.19.1-x86_64-unknown-linux-gnu.tar.gz" \
| tar xzf - -C /usr/local/bin
- run: npm install
- run: npm run abridge
- name: 'Build only'
uses: shalzz/[email protected]
env:
BUILD_DIR: .
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_ONLY: true
build_and_deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: 'Checkout'
uses: actions/checkout@main
- uses: actions/setup-node@v4
with:
node-version: 20
- run: |
apt-get update && apt-get install -y wget git
- run: |
wget -q -O - \
"https://github.com/getzola/zola/releases/download/v0.19.1/zola-v0.19.1-x86_64-unknown-linux-gnu.tar.gz" \
| tar xzf - -C /usr/local/bin
- run: npm install
- run: npm run abridge
- name: 'Build and deploy'
uses: shalzz/[email protected]
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: .
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}