git.iko.soy/typeable/oauth2-proxy
on ea261ca help sign in
67 lines 1.8 kB history raw
1name: documentation
3on:
4 pull_request:
5 branches: [master]
6 paths: ['docs/**']
7 push:
8 branches: [master]
9 paths: ['docs/**']
11jobs:
12 checks:
13 if: github.event_name != 'push'
14 runs-on: ubuntu-latest
15 steps:
16 - uses: actions/checkout@v1
17 - uses: actions/setup-node@v1
18 with:
19 node-version: '12.x'
20 - name: Test Build
21 working-directory: ./docs
22 run: |
23 if [ -e yarn.lock ]; then
24 yarn install --frozen-lockfile
25 elif [ -e package-lock.json ]; then
26 npm ci
27 else
28 npm i
29 fi
30 npm run build
31 gh-release:
32 if: github.event_name != 'pull_request'
33 runs-on: ubuntu-latest
34 steps:
35 - uses: actions/checkout@v1
36 - uses: actions/setup-node@v1
37 with:
38 node-version: '12.x'
39 - name: Add key to allow access to repository
40 env:
41 SSH_AUTH_SOCK: /tmp/ssh_agent.sock
42 run: |
43 mkdir -p ~/.ssh
44 ssh-keyscan github.com >> ~/.ssh/known_hosts
45 echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
46 chmod 600 ~/.ssh/id_rsa
47 cat <<EOT >> ~/.ssh/config
48 Host github.com
49 HostName github.com
50 IdentityFile ~/.ssh/id_rsa
51 EOT
52 - name: Release to GitHub Pages
53 working-directory: ./docs
54 env:
55 USE_SSH: true
56 GIT_USER: git
57 run: |
58 git config --global user.email "actions@gihub.com"
59 git config --global user.name "gh-actions"
60 if [ -e yarn.lock ]; then
61 yarn install --frozen-lockfile
62 elif [ -e package-lock.json ]; then
63 npm ci
64 else
65 npm i
66 fi
67 npx docusaurus deploy