Compare commits
1 commit
master
...
feat/pr-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c45fae8ff |
4 changed files with 80 additions and 0 deletions
47
.github/workflows/build-artifact.yml
vendored
Normal file
47
.github/workflows/build-artifact.yml
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
name: "Build Artifact"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
preview:
|
||||
description: "Is this a preview deployment?"
|
||||
default: false
|
||||
required: false
|
||||
type: boolean
|
||||
url:
|
||||
description: "Domain the deployment will be hosted on"
|
||||
required: false
|
||||
type: string
|
||||
baseurl:
|
||||
description: "Path where does are hosted on domain"
|
||||
required: false
|
||||
type: string
|
||||
|
||||
env:
|
||||
NODE_VERSION: "17"
|
||||
DEPLOY_PREVIEW: ${{ inputs.preview }}
|
||||
PREVIEW_URL: ${{ inputs.url }}
|
||||
PREVIEW_BASE_URL: ${{ inputs.baseurl }}
|
||||
|
||||
jobs:
|
||||
build-docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: "Setup Node ${{ env.NODE_VERSION }}"
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "${{ env.NODE_VERSION }}"
|
||||
cache: "yarn"
|
||||
- name: "Install Dependencies"
|
||||
run: "bundle install"
|
||||
- name: "Build Docs"
|
||||
run: bundle exec jekyll build
|
||||
- name: "Upload HTML"
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: html
|
||||
path: _site/
|
||||
retention-days: 1
|
||||
29
.github/workflows/build-pr.yml
vendored
Normal file
29
.github/workflows/build-pr.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Based on https://github.com/KyoriPowered/adventure-docs
|
||||
|
||||
name: "Build PR"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.event.number || github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/build-artifact.yaml
|
||||
with:
|
||||
preview: true
|
||||
url: "https://geysermc.github.io"
|
||||
baseurl: "/docs-previews/pull/${{ github.event.number }}/"
|
||||
publish-pr-number:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "pr number / save"
|
||||
run: "echo ${{ github.event.number }} > ./pr-num.txt"
|
||||
- name: "pr number / publish"
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "pr-num"
|
||||
path: "./pr-num.txt"
|
||||
retention-days: 1
|
||||
2
Gemfile
2
Gemfile
|
|
@ -21,3 +21,5 @@ gem "github-pages", group: :jekyll_plugins
|
|||
# group :jekyll_plugins do
|
||||
# gem "jekyll-github-metadata", "~> 1.0"
|
||||
# end
|
||||
|
||||
gem 'webrick'
|
||||
|
|
@ -279,6 +279,7 @@ GEM
|
|||
unf_ext (0.0.8)
|
||||
unf_ext (0.0.8-x64-mingw32)
|
||||
unicode-display_width (1.8.0)
|
||||
webrick (1.7.0)
|
||||
zeitwerk (2.5.4)
|
||||
|
||||
PLATFORMS
|
||||
|
|
@ -287,6 +288,7 @@ PLATFORMS
|
|||
|
||||
DEPENDENCIES
|
||||
github-pages
|
||||
webrick
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue