-
Notifications
You must be signed in to change notification settings - Fork 21
79 lines (65 loc) · 1.9 KB
/
deploy.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
name: Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
env:
NODE_VERSION: "12.x"
PYTHON_VERSION: "3.x"
jobs:
deploy:
name: Deploy Tech Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Node
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
with:
node-version: "${{env.NODE_VERSION}}"
- name: Setup Ruby
uses: ruby/setup-ruby@54a18e26dbbb1eabc604f317ade9a5788dddef81
with:
bundler-cache: true
- name: Setup Python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236
with:
python-version: "${{env.PYTHON_VERSION}}"
- name: Install Python and Node dependencies
run: |
npm ci
pip install --user -r requirements.txt
- name: Node tests
run: npm test
- name: Python tests
run: |
gem install webrick
make test
- name: Build middleman site
run: make build
- name: Upload artifact
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c
with:
path: 'build'
- name: Deploy to GitHub pages
id: deployment
uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5
- name: Slack notify on failure
if: failure()
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117
with:
payload: |
{
"text": "Deployment of Paas Tech Docs with commit ${{ github.sha }} FAILED."
}
env:
SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK