-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (45 loc) · 1.42 KB
/
deploy.yml
File metadata and controls
54 lines (45 loc) · 1.42 KB
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
# SPDX-FileCopyrightText: 2020 The HedgeDoc developers (see AUTHORS file)
#
# SPDX-License-Identifier: AGPL-3.0-only
name: Deploy to github actions branch
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Check out repo
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
# renovate: datasource=github-releases depName=gohugoio/hugo versioning=semver
hugo-version: "0.157.0"
extended: true
- name: Use Node.js 18
uses: actions/setup-node@v6
with:
node-version: 18
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node_modules
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile --prefer-offline
- name: Run Hugo
run: hugo --minify
- name: Deploy to GitHub Pages Branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public