-
Notifications
You must be signed in to change notification settings - Fork 93
43 lines (40 loc) · 1.26 KB
/
gh-pages.yaml
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
name: Github Pages
on:
push:
branches:
- master
paths:
- '**.md'
- 'docs/**'
permissions:
contents: read
jobs:
publish:
permissions:
contents: write
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@951b48540b429070694bc8abd82fd6901eb123ca
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08
with:
fetch-depth: 0
- name: Copy new docs to gh-pages
run: |
git checkout gh-pages
git checkout ${GITHUB_REF##*/} ADOPTERS.md
git checkout ${GITHUB_REF##*/} README.md
git checkout ${GITHUB_REF##*/} CONTRIBUTING.md
git checkout ${GITHUB_REF##*/} CHANGELOG.md
git checkout ${GITHUB_REF##*/} docs
- name: Push to gh-pages
uses: EndBug/add-and-commit@b3200cb7c06b8e291e7b9ca6d1b33222ddc371c8
with:
author_name: ${{ github.actor }}
author_email: ${{ github.actor }}@users.noreply.github.com
message: "Documentation sync from master"
branch: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}