-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (39 loc) · 1.1 KB
/
documentation.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
name: documentation
on:
pull_request:
branches: [latest]
push:
branches: [latest]
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Lint
run: |
npm ci
npm run textlint
- name: Test Build
run: |
cd website
npm ci
npm run build
gh-release:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
# Waits for test jobs for each Node.js version to complete
needs: checks
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Release to GitHub Pages
run: |
git config --global user.email "christopher.astfalk@icloud.com"
git config --global user.name "Christopher Astfalk"
echo "machine github.com login ${{ secrets.GH_NAME }} password ${{ secrets.GH_TOKEN }}" > ~/.netrc
cd website && npm ci && GIT_USER="${{ secrets.GH_NAME }}" npm run publish-gh-pages