-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (42 loc) · 1.2 KB
/
deploy-docs.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
name: Deploy Docs to GitHub Pages
on:
push:
branches:
- main
paths:
- Docs/**
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs:
deploy:
name: Deploy Docs to GitHub Pages
if: github.repository == 'tls-attacker/TLS-Anvil'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- uses: actions/checkout@v3
with:
path: gh-pages
ref: gh-pages
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
cache-dependency-path: main/Docs/package-lock.json
- name: Install dependencies
working-directory: main/Docs
run: npm ci
- name: Build website
working-directory: main/Docs
run: npm run build
- name: Copy build files
run: |
rsync -a --exclude=".git/" --delete main/Docs/build/ gh-pages
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
path: gh-pages
title: Update Docs
base: gh-pages