-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to Github Workflows for deployment. Part 1. (#31)
* Switch to Github Workflows for deployment. Part 1. * Fix build * Add check-format script
- Loading branch information
1 parent
b0e285b
commit 1e958ab
Showing
5 changed files
with
78 additions
and
95 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [joeldenning] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build, Test, Release | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: "*" | ||
|
||
jobs: | ||
build_test: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Install Pnpm | ||
uses: pnpm/action-setup@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: pnpm | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Test | ||
run: | | ||
pnpm run lint | ||
pnpm run check-format | ||
pnpm run test | ||
- name: Build | ||
run: pnpm run build | ||
|
||
- name: Store artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
release: | ||
name: Release | ||
needs: build_test | ||
runs-on: ubuntu-latest | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
steps: | ||
- name: Download build artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
|
||
- name: Authenticate with GCP | ||
uses: "google-github-actions/auth@v2" | ||
with: | ||
workload_identity_provider: "projects/654158993889/locations/global/workloadIdentityPools/github/providers/my-repo" | ||
|
||
- name: Upload Static Files to CDN | ||
uses: "google-github-actions/upload-cloud-storage@v2" | ||
with: | ||
path: dist | ||
destination: "react.microfrontends.app/people/${{ env.GITHUB_RUN_ID }}/" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pnpm exec pretty-quick --staged && pnpm exec concurrently yarn:test yarn:lint | ||
pnpm exec pretty-quick --staged && pnpm exec concurrently pnpm:test pnpm:lint |
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