Skip to content

Commit

Permalink
Fix deploy buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
geirsagberg committed Mar 12, 2023
1 parent 8123830 commit 52c1e72
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ To use GDC, you need a couple of things:
- `ref`: Which release version to deploy (e.g. v1.0.3)
- `environment`: Which environment to deploy to (e.g. dev, test or prod)
- The workflow must create a deployment for the same commit as the release, and update status on success or failure.
- RECOMMENDED: If you create the deployment with the `payload` of `{"workflow_run_id": ${{ github.run_id }}}`, the deployment will be linked to the workflow run in the UI.
- See [the GDC Deploy workflow](./.github/workflows/deploy.yml) as an example.

## Hosting
Expand Down
32 changes: 18 additions & 14 deletions src/components/ReleasesTableView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export const ReleasesTableView = () => {
{workflowRun && (
<Tooltip title={`${workflowRun.name} #${workflowRun.run_number}`}>
<IconButton
size="medium"
color={
workflowRun.conclusion
? workflowRun.conclusion === 'success'
Expand All @@ -170,7 +171,7 @@ export const ReleasesTableView = () => {
}
target="_blank"
href={workflowRun.html_url}>
<Icon>launch</Icon>
<Icon fontSize="small">launch</Icon>
</IconButton>
</Tooltip>
)}
Expand All @@ -189,19 +190,22 @@ export const ReleasesTableView = () => {
<TableCell>Release name</TableCell>
{selectedEnvironments.map((environment) => (
<TableCell key={environment.name}>
<Link
href={`https://github.com/${repo?.owner}/${
repo?.name
}/deployments/activity_log?environment=${encodeURIComponent(
environment.name
)}`}
target="_blank"
color="inherit">
{environment.name}
</Link>
<IconButton onClick={() => removeEnvironment(environment.name)}>
<Icon>delete</Icon>
</IconButton>
<Stack direction="row" gap={1} alignItems="center">
<Link
href={`https://github.com/${repo?.owner}/${
repo?.name
}/deployments/activity_log?environment=${encodeURIComponent(
environment.name
)}`}
target="_blank"
color="inherit">
{environment.name}
</Link>
<IconButton
onClick={() => removeEnvironment(environment.name)}>
<Icon>delete</Icon>
</IconButton>
</Stack>
</TableCell>
))}
</TableRow>
Expand Down
2 changes: 1 addition & 1 deletion src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const theme = createMuiTheme({
MuiDialogContent: {
styleOverrides: {
root: {
paddingTop: '0.5rem !important',
paddingTop: '1rem !important',
},
},
},
Expand Down

0 comments on commit 52c1e72

Please sign in to comment.