-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (87 loc) · 3.93 KB
/
dispatch-bd-fe--cms.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: 📡 CMS Publish
run-name: "📢 CMS Publish to ${{ inputs.env == 'prd' && 'PRD' || 'STG' }}"
on:
workflow_dispatch:
inputs:
env:
description: "Target deployment environment."
type: environment
required: true
default: "stg"
permissions:
checks: write
contents: write
pull-requests: write
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
lint:
name: 💨
uses: ./.github/workflows/lint.yml
with:
env: ${{ inputs.env }}
build_deploy:
name: 🚀
needs: lint
uses: ./.github/workflows/bd-fe.yml
with:
env: ${{ inputs.env }}
secrets:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
API_URL: ${{ secrets.PUBLIC_API_URL }}
API_PATH_NAVIGATION: ${{ secrets.PUBLIC_API_PATH_NAVIGATION }}
API_PATH_HOME: ${{ secrets.PUBLIC_API_PATH_HOME }}
API_PATH_FOOTER: ${{ secrets.PUBLIC_API_PATH_FOOTER }}
API_PATH_PRIVACY: ${{ secrets.PUBLIC_API_PATH_PRIVACY }}
API_PATH_POSTS_PAGE: ${{ secrets.PUBLIC_API_PATH_POSTS_PAGE }}
API_PATH_POSTS: ${{ secrets.PUBLIC_API_PATH_POSTS }}
POSTS_PREVIEW_PARAMS: ${{ secrets.PUBLIC_POSTS_PREVIEW_PARAMS }}
API_PATH_POST: ${{ secrets.PUBLIC_API_PATH_POST }}
POST_PARAMS: ${{ secrets.PUBLIC_POST_PARAMS }}
API_PATH_CATEGORY: ${{ secrets.PUBLIC_API_PATH_CATEGORY }}
CATEGORY_PAGE_PARAMS: ${{ secrets.PUBLIC_CATEGORY_PAGE_PARAMS }}
API_PATH_CV_PAGE: ${{ secrets.PUBLIC_API_PATH_CV_PAGE }}
API_LANDING_PAGE_PARTIAL: ${{ secrets.PUBLIC_API_LANDING_PAGE_PARTIAL }}
API_CV_COLLECTION_PARAMS: ${{ secrets.PUBLIC_API_CV_COLLECTION_PARAMS }}
API_CV_PATH_LANDING_POSITION_LISTING: ${{ secrets.PUBLIC_API_CV_PATH_LANDING_POSITION_LISTING }}
API_CV_PATH_LANDING_EXPERIENCE_LISTING: ${{ secrets.PUBLIC_API_CV_PATH_LANDING_EXPERIENCE_LISTING }}
API_KEY: ${{ secrets.API_KEY }}
PUBLIC_ENV: ${{ secrets.PUBLIC_ENV }}
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
GH_WORKFLOW_TOKEN: ${{ secrets.GH_WORKFLOW_TOKEN }}
backstop:
name: 👀
needs: build_deploy
uses: ./.github/workflows/test-backstop.yml
with:
env: ${{ inputs.env }}
secrets:
GH_WORKFLOW_TOKEN: ${{ secrets.GH_WORKFLOW_TOKEN }}
AWS_S3_BUCKET_REPORTS: ${{ secrets.AWS_S3_BUCKET_REPORTS }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
REPORTS_DISTRIBUTION: ${{ secrets.REPORTS_DISTRIBUTION }}
summarize:
name: ✍ Workflow
needs: [backstop, lighthouse, pagespeed]
runs-on: ubuntu-latest
environment:
name: ${{ inputs.env }}
url: "https://${{ vars.WWW_DOMAIN }}"
steps:
- name: generate
run: |
echo '# Summary' >> $GITHUB_STEP_SUMMARY
echo '## Run Initiator'
echo '- Actor: ${{ github.actor }}' >> $GITHUB_STEP_SUMMARY
echo '- Event: ${{ github.event_name }}' >> $GITHUB_STEP_SUMMARY
echo '## Run Details' >> $GITHUB_STEP_SUMMARY
echo '- Branch: [${{ env.BRANCH_NAME }}](https://github.com/dgrebb/dgrebb.com/tree/${{ env.BRANCH_NAME }})' >> $GITHUB_STEP_SUMMARY
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo '- Pull Request: [#${{ github.event.number }}](https://github.com/dgrebb/dgrebb.com/pull/${{ github.event.number }}) ${{ github.event.pull_request.title }}' >> $GITHUB_STEP_SUMMARY
echo '- ${{ github.event.pull_request.changed_files }} Files Changed: [ ${{ github.event.pull_request.commits }} Commits](https://github.com/dgrebb/dgrebb.com/pull/${{ github.event.number }}/commits) | [Diff](https://github.com/dgrebb/dgrebb.com/pull/${{ github.event.number }}/files)' >> $GITHUB_STEP_SUMMARY
fi