Merge pull request #1 from zkSync-Community-Hub/staging #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "deploy 🚀" | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build_and_deploy: | |
env: | |
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} | |
if: ${{ github.event.repository.full_name == github.repository }} | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
- uses: actions/checkout@v4 # v4 | |
with: | |
fetch-depth: 0 | |
# Whether to configure the token or SSH key with the local git config | |
# Default: true | |
persist-credentials: false # <--- checking this in commit context | |
- uses: oven-sh/setup-bun@v1 | |
- name: "Install dependencies" | |
run: bun install | |
- name: "Deploy target: production 🚀" | |
run: bun run generate | |
# TODO: ask about below | |
# env: | |
# RUDDERSTACK_WRITE_KEY: "${{ secrets.RUDDERSTACK_WRITE_KEY }}" | |
# RUDDERSTACK_DATA_PLANE_URL: "${{ secrets.RUDDERSTACK_DATA_PLANE_URL }}" | |
- uses: matter-labs/action-hosting-deploy@main | |
with: | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_COMMUNITY_COOKBOOK }}" | |
target: prod | |
projectId: community-cookbook | |
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 }}" |