Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release cloud-admin to netlify when tag #2057

Merged
merged 20 commits into from
Apr 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/cloud-admin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Deploy Cloud Admin to Netlify
on:
push:
tags:
- "*"
branches: ["main"]
paths:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need paths here – any tag on main can just trigger a build.

If you want to keep the paths – we also need to add web-common here

- ".github/workflows/cloud-admin.yml"
- "web-admin/**"
- "web-common/**"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ fromJSON('["e73ac785-882e-425a-8fc8-5432528bb374","afb26917-7a60-47d9-81dc-c0babbb0d9a9"]')[ startsWith(github.ref, 'refs/tags/v') == 'true' ] }}
DEPLOY_SITE: ${{ fromJSON('["ui.rilldata.io","ui.rilldata.com"]')[ startsWith(github.ref, 'refs/tags/v') == 'true' ] }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 16

- name: Build Cloud Admin
run: |-
npm install
npm run build -w web-admin

- name: Deploy cloud-admin to Netlify
uses: nwtgck/actions-netlify@v1.2
with:
publish-dir: ./web-admin/build
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Cloud-admin ${{ github.ref_name }} deployed to ${{ env.DEPLOY_SITE }}"
production-deploy: true
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
timeout-minutes: 1