Skip to content

Commit e2bfcf8

Browse files
authored
ci: replace deployment action with builtin deployment support (#218)
1 parent c8b9647 commit e2bfcf8

2 files changed

Lines changed: 7 additions & 41 deletions

File tree

.github/workflows/deploy-preview.yaml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ jobs:
2626
if: |
2727
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe'))
2828
|| (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
29+
environment:
30+
name: Preview
31+
url: ${{ steps.vercel-action.outputs.preview-url }}
2932
permissions:
30-
deployments: write
3133
pull-requests: write
3234
steps:
3335
- name: Checkout
@@ -55,14 +57,6 @@ jobs:
5557
poetry install --no-root --only main
5658
poetry run python bin/website build
5759
58-
- name: Start Deployment
59-
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1.5.0
60-
id: deployment
61-
with:
62-
step: start
63-
token: ${{ secrets.GITHUB_TOKEN }}
64-
env: Preview
65-
6660
- name: Build
6761
run: npx hugo --buildDrafts --buildFuture --logLevel info
6862

@@ -78,14 +72,3 @@ jobs:
7872
scope: python-poetry
7973
github-comment: true
8074
working-directory: public
81-
82-
- name: Update Deployment Status
83-
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1.5.0
84-
if: always()
85-
with:
86-
step: finish
87-
token: ${{ secrets.GITHUB_TOKEN }}
88-
status: ${{ job.status }}
89-
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
90-
env_url: ${{ steps.vercel-action.outputs.preview-url }}
91-
env: ${{ steps.deployment.outputs.env }}

.github/workflows/deploy-production.yaml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ on:
1111
permissions: {}
1212

1313
jobs:
14-
deploy-preview:
14+
deploy-production:
1515
name: Build & Deploy
1616
runs-on: ubuntu-latest
1717
timeout-minutes: 15
18+
environment:
19+
name: Production
20+
url: ${{ steps.vercel-action.outputs.preview-url }}
1821
permissions:
19-
deployments: write
2022
pull-requests: write
2123

2224
steps:
@@ -53,14 +55,6 @@ jobs:
5355
poetry install --no-root --only main
5456
poetry run python bin/website build
5557
56-
- name: Start Deployment
57-
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1.5.0
58-
id: deployment
59-
with:
60-
step: start
61-
token: ${{ secrets.GITHUB_TOKEN }}
62-
env: Production
63-
6458
- name: Build
6559
run: npx hugo --minify --logLevel info
6660

@@ -88,14 +82,3 @@ jobs:
8882
github-comment: false
8983
vercel-args: "--prod"
9084
working-directory: public
91-
92-
- name: Update Deployment Status
93-
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1.5.0
94-
if: always()
95-
with:
96-
step: finish
97-
token: ${{ secrets.GITHUB_TOKEN }}
98-
status: ${{ job.status }}
99-
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
100-
env_url: ${{ steps.vercel-action.outputs.preview-url }}
101-
env: ${{ steps.deployment.outputs.env }}

0 commit comments

Comments
 (0)