Repository navigation
68 lines (63 loc) · 1.67 KB
/
Copy pathdocs.yml
File metadata and controls
68 lines (63 loc) · 1.67 KB
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
64
65
66
67
68
name: Docs
on:
push:
branches: [main, staging]
paths:
- "docs/**"
- "package.json"
- "package-lock.json"
- ".github/workflows/docs.yml"
pull_request:
branches: [main, staging]
paths:
- "docs/**"
- "package.json"
- "package-lock.json"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# lastUpdated timestamps come from git history.
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run docs:build
- uses: actions/upload-pages-artifact@v3
if: >-
github.ref == 'refs/heads/main' &&
github.event_name != 'pull_request' &&
github.repository == 'openhat-security/phishkit'
with:
path: docs/.vitepress/dist
deploy:
needs: build
if: >-
github.ref == 'refs/heads/main' &&
github.event_name != 'pull_request' &&
github.repository == 'openhat-security/phishkit'
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
# Pages must be enabled once by a repository admin after the repository
# becomes public. Workflow tokens cannot perform that owner-level setup.
- uses: actions/configure-pages@v5
- id: deploy
uses: actions/deploy-pages@v4