-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (41 loc) · 1.3 KB
/
publish-gh-pages.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
name: Publish Website to GitHub Pages
on:
push:
branches: # triggers on any push to master
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
template-dir: ./gh-pages-template
steps:
# copy your repo to actions
- uses: actions/checkout@master
# clone this repo to a subdir
- uses: actions/checkout@master
with:
repository: synx-ai/gh-pages-template
path: ${{env.template-dir}}
# clone the "README.md" file, you may edit this
# please note that only markdown and mdx files are supported and
# filenames are case sensitive.
- name: 🧬 Readme.md cloning
uses: canastro/copy-file-action@master
with:
source: "readme.md"
target: "gh-pages-template/src/README.md"
- name: ⚙️ Install dependencies
working-directory: ${{env.template-dir}}
run: yarn install
- name: 🧪 Test
working-directory: ${{env.template-dir}}
run: yarn format && yarn test
- name: 🛠 Build
working-directory: ${{env.template-dir}}
run: yarn build
# this will deploy to gh-pages branch, remember to enable it in repo settings
- name: 🚀 Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs