-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (79 loc) · 2.73 KB
/
pages.yaml
File metadata and controls
83 lines (79 loc) · 2.73 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
73
74
75
76
77
78
79
80
81
82
83
name: deploy docs
on:
workflow_dispatch:
branches:
- master
push:
jobs:
staging:
name: Deploy to Staging Cloudflare Pages
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.11'
cache: 'pip'
- run: pip install -r requirements.txt
- run: dbt docs generate
env:
DBT_HOST: ${{ secrets.PRODUCTION_HOST }}
DBT_PORT: ${{ secrets.PRODUCTION_PORT }}
DBT_USER: ${{ secrets.PRODUCTION_USER }}
DBT_PASSWORD: ${{ secrets.PRODUCTION_PASSWORD }}
DBT_SECURE: ${{ secrets.PRODUCTION_SECURE }}
- run: ./docs.sh
- name: Publish
uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1.5.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ethpandaops-platform-staging-dbt
directory: target
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
production:
name: Deploy to Production Cloudflare Pages
needs: staging
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.11'
cache: 'pip'
- run: pip install -r requirements.txt
- run: dbt docs generate
env:
DBT_HOST: ${{ secrets.PRODUCTION_HOST }}
DBT_PORT: ${{ secrets.PRODUCTION_PORT }}
DBT_USER: ${{ secrets.PRODUCTION_USER }}
DBT_PASSWORD: ${{ secrets.PRODUCTION_PASSWORD }}
DBT_SECURE: ${{ secrets.PRODUCTION_SECURE }}
- run: ./docs.sh
- name: Publish
uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1.5.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ethpandaops-platform-production-dbt
directory: target
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
notify:
name: Discord Notification
runs-on: ubuntu-latest
needs:
- staging
- production
if: failure() || cancelled()
steps:
- name: Notify
uses: nobrayner/discord-webhook@1766a33bf571acdcc0678f00da4fb83aad01ebc7 # v1
with:
github-token: ${{ secrets.github_token }}
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}