-
Notifications
You must be signed in to change notification settings - Fork 120
82 lines (74 loc) · 2.52 KB
/
push.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
name: Build and deploy
on:
push:
branches:
- master
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build:
name: Build
env:
GOPATH: ${{ github.workspace }}/go
runs-on: pulumi-service-ubuntu-22.04-16core
environment: production
steps:
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Install Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.111.0'
extended: true
- name: Check out branch
uses: actions/checkout@v4
with:
token: ${{ secrets.PULUMI_BOT_TOKEN }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::388588623842:role/ContinuousDelivery
role-session-name: docs-deploy
role-duration-seconds: 7200
aws-region: us-west-2
- name: Install Pulumi CLI
uses: pulumi/actions@v4
- name: Build and deploy
run: make ci_push
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ALGOLIA_APP_ID: ${{ vars.ALGOLIA_APP_ID }}
ALGOLIA_APP_SEARCH_KEY: ${{ vars.ALGOLIA_APP_SEARCH_KEY }}
ALGOLIA_APP_ADMIN_KEY: ${{ secrets.ALGOLIA_APP_ADMIN_KEY }}
PULUMI_STACK_NAME: ${{ vars.PULUMI_STACK_NAME }}
PULUMI_DOCS_STACK_NAME: ${{ vars.PULUMI_DOCS_STACK_NAME }}
DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }}
NODE_OPTIONS: "--max_old_space_size=8192"
- name: Archive bucket metadata
uses: actions/upload-artifact@v4
with:
name: origin-bucket-metadata
path: origin-bucket-metadata.json
notify:
if: failure()
name: Send slack notification
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Slack Notification
uses: docker://sholung/action-slack-notify:v2.3.0
env:
SLACK_CHANNEL: docs-ops
SLACK_COLOR: "#F54242"
SLACK_MESSAGE: "build and deploy failure in pulumi/registry repo :meow_sad:"
SLACK_USERNAME: registrybot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_ICON: https://www.pulumi.com/logos/brand/avatar-on-white.png