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