-
Notifications
You must be signed in to change notification settings - Fork 6
64 lines (53 loc) · 1.59 KB
/
website.yaml
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
58
59
60
61
62
63
64
# SPDX-FileCopyrightText: 2023 Steffen Vogel <[email protected]>
# SPDX-License-Identifier: Apache-2.0
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json
---
name: Build and deploy website
on:
workflow_dispatch:
push:
tags:
- 'v*'
defaults:
run:
shell: bash
working-directory: website
jobs:
deploy:
name: Build and deploy website
runs-on: ubuntu-24.04
environment: release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.5
- name: Setup yarn
run: |
corepack enable
corepack prepare [email protected] --activate
yarn set version 4.5.0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
- name: Restore yarn cache
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- name: Install Yarn dependencies
run: yarn install
- name: Build website
run: yarn build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com