forked from refinedev/refine
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (70 loc) · 2.28 KB
/
pull-request-doc.yml
File metadata and controls
72 lines (70 loc) · 2.28 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Pull Request Documentation [synchronize]
on:
pull_request:
types:
- synchronize
- opened
- reopened
paths:
- "documentation/**"
jobs:
documentation:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Workflow run cleanup action
uses: rokroskar/workflow-run-cleanup-action@v0.2.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v2
- name: Add key to allow access to repository
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
cat <<EOT >> ~/.ssh/config
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa
EOT
- name: Install Dependencies
run: |
npm ci
npm run bootstrap
- name: Wait for Netlify Deploy
uses: probablyup/wait-for-netlify-action@3.2.0
id: waitForDeployment
with:
site_id: ${{ secrets.NETLIFY_PREVIEW_SITE_ID }}
env:
NETLIFY_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
- name: output test
run: |
echo ${{ steps.waitForDeployment.outputs.url }}
- name: Install Dependencies
run: |
cd documentation
npm install
LIVE_PREVIEW_URL=${{ steps.waitForDeployment.outputs.url }}/preview npm run build
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.2
with:
publish-dir: './documentation/build'
github-token: ${{ secrets.PANKOD_BOT_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
overwrites-pull-request-comment: false
github-deployment-environment: "deploy-preview-website-${{ github.event.number }}"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 10