Skip to content

Commit cbd42e9

Browse files
authored
chore: add workflow to deploy docs page (#17)
1 parent 0bd0441 commit cbd42e9

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/GHPages.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch: null
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow one concurrent deployment
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: true
18+
19+
jobs:
20+
deploy:
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
- uses: actions/setup-node@v3
29+
with:
30+
node-version: 18
31+
- name: Install Packages
32+
run: npm ci
33+
- name: Build docs
34+
run: |+
35+
export NODE_OPTIONS=--openssl-legacy-provider
36+
npm run docs:build
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v2
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v1
41+
with:
42+
path: ./docs/.vuepress/dist
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v1

docs/.vuepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use strict"
22

33
module.exports = {
4+
base: "/eslint-utils/",
45
title: "@eslint-community/eslint-utils",
56
description: "Utilities for ESLint plugins and custom rules.",
67
serviceWorker: true,

0 commit comments

Comments
 (0)