-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (58 loc) · 2.12 KB
/
deploy-documentation.yml
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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Build Docs
on:
push:
branches:
- main
- develop
workflow_dispatch:
env:
base_url: /VSDS-Linked-Data-Interactions
title: "Linked Data Interactions"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
- name: Determine version
id: version
run: |
export VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)
echo "version=$VERSION" >> $>> $GITHUB_OUTPUT
- name: Setup Ruby
uses: ruby/setup-ruby@0a29871fe2b0200a17a4497bae54fe5df0d973aa
with:
ruby-version: '3.0' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Build with Jekyll
run: |
cd docs
bundle install
bundle exec jekyll build --baseurl "${{env.base_url}}/${{steps.version.outputs.version}}" -s "./" -d "./_site"
env:
JEKYLL_ENV: production
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- run: npm i -g @yalz/gh-pages-multi
- run: |
git config --global user.email "[email protected]"
git config --global user.name "VSDS CI"
git config --global url.https://${{ env.PAT }}@github.com/.insteadOf https://github.com/
env:
PAT: ${{secrets.DEPLOY_DOCS_PAT}}
- run: |
gh-pages-multi deploy --title "${{env.title}}" -t ${{steps.version.outputs.version}} -s docs/_site
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}