Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Chew
8c45fae8ff
Deploy on PR 2022-03-21 11:47:12 -05:00
4 changed files with 80 additions and 0 deletions

47
.github/workflows/build-artifact.yml vendored Normal file
View 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
View 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

View file

@ -21,3 +21,5 @@ gem "github-pages", group: :jekyll_plugins
# group :jekyll_plugins do # group :jekyll_plugins do
# gem "jekyll-github-metadata", "~> 1.0" # gem "jekyll-github-metadata", "~> 1.0"
# end # end
gem 'webrick'

View file

@ -279,6 +279,7 @@ GEM
unf_ext (0.0.8) unf_ext (0.0.8)
unf_ext (0.0.8-x64-mingw32) unf_ext (0.0.8-x64-mingw32)
unicode-display_width (1.8.0) unicode-display_width (1.8.0)
webrick (1.7.0)
zeitwerk (2.5.4) zeitwerk (2.5.4)
PLATFORMS PLATFORMS
@ -287,6 +288,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
github-pages github-pages
webrick
BUNDLED WITH BUNDLED WITH
2.2.32 2.2.32