-
Notifications
You must be signed in to change notification settings - Fork 14
59 lines (51 loc) · 2.04 KB
/
deploy-prod.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
name: "deploy 🚀"
on:
push:
branches: [main]
env:
HUSKY: 0
CI: true
NUXT_SITE_ENV: production # used for NuxtSEO to disable things like indexing on staging
concurrency:
group: production
cancel-in-progress: true
jobs:
build_and_deploy:
env:
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }}
ALGOLIA_SEARCH_API_KEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }}
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
if: ${{ github.event.repository.full_name == github.repository }}
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4 # v4
with:
persist-credentials: false # <--- checking this in commit context
- uses: oven-sh/setup-bun@v1
- name: "Install dependencies"
run: bun install --production --frozen-lockfile
- name: "Deploy target: production 🚀"
run: bun run build
- uses: matter-labs/action-hosting-deploy@main
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_COMMUNITY_COOKBOOK_59807 }}"
projectId: community-cookbook-59807
channelId: live
# TODO: re-enable once we are closer to production deployment
# - name: Purge cf cache
# uses: nathanvaughn/actions-cloudflare-purge@db8c58f61ba4c3ec77229c8fa14ddebb3b59932f # v3.1.0
# with:
# cf_zone: ${{ secrets.CLOUDFLARE_ZONE }}
# cf_auth: ${{ secrets.CLOUDFLARE_AUTH_KEY }}
# hosts: |
# docs.zksync.io
# era.zksync.io
# v2-docs.zksync.io
# TODO: Implement reindex task tracking instead of blindly exiting on task submit
# - name: Trigger Algolia reindex
# run: |
# curl -X POST "${{ secrets.ALGOLIA_CRAWLER_BASE_URL }}/crawlers/${{ secrets.ALGOLIA_CRAWLER_ID }}/reindex" \
# -H "Content-Type: application/json" \
# --user "${{ secrets.ALGOLIA_CRAWLER_USER_ID }}:${{ secrets.ALGOLIA_CRAWLER_API_KEY }}"