mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2026-04-22 22:57:04 +08:00
ee0e60df68
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
68 lines
1.6 KiB
YAML
68 lines
1.6 KiB
YAML
# SPDX-FileCopyrightText: 2023 Steffen Vogel <post@steffenvogel.de>
|
|
# 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 to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: website
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Build and deploy website to GitHub Pages
|
|
runs-on: ubuntu-latest
|
|
environment: release
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
run: sudo apt-get install -y
|
|
coturn
|
|
protobuf-compiler
|
|
make
|
|
libpcap-dev
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
|
|
- name: Install build and test dependencies
|
|
run: make install-deps
|
|
working-directory: ./
|
|
|
|
- name: Generate docs
|
|
run: make docs
|
|
working-directory: ./
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: yarn
|
|
cache-dependency-path: website/yarn.lock
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Build website
|
|
run: yarn build
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
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
|