Skip to content

Commit 3dd7208

Browse files
committed
[cd] handle the installer separately
1 parent 058b8a9 commit 3dd7208

2 files changed

Lines changed: 47 additions & 10 deletions

File tree

.github/workflows/cd.installer.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
on:
2+
push:
3+
branches: main
4+
paths: installer.sh
5+
6+
jobs:
7+
qa:
8+
uses: ./.github/workflows/ci.installer.yml
9+
10+
put:
11+
permissions:
12+
deployments: write
13+
needs: qa
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Create Deployment
17+
uses: bobheadxi/deployments@v1
18+
id: deployment
19+
with:
20+
step: start
21+
env: installer
22+
23+
- uses: aws-actions/configure-aws-credentials@v4
24+
with:
25+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
26+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
27+
aws-region: us-east-1
28+
29+
- run:
30+
aws s3 cp
31+
./installer.sh s3://www.pkgx.sh/installer.sh
32+
--metadata-directive REPLACE
33+
--cache-control no-cache,must-revalidate
34+
35+
- run:
36+
aws cloudfront create-invalidation
37+
--distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
38+
--paths / /installer.sh
39+
40+
- name: Seal Deployment
41+
uses: bobheadxi/deployments@v1
42+
if: always()
43+
with:
44+
env: installer
45+
step: finish
46+
status: ${{ job.status }}
47+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

.github/workflows/cd.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@ jobs:
4848
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4949
aws-region: us-east-1
5050

51-
- run:
52-
aws s3 cp
53-
./installer.sh s3://www.pkgx.sh/installer.sh
54-
--metadata-directive REPLACE
55-
--cache-control no-cache,must-revalidate
56-
- run:
57-
aws cloudfront create-invalidation
58-
--distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
59-
--paths / /installer.sh
60-
6151
- uses: git-actions/set-user@v1
6252
- run: |
6353
git add dist

0 commit comments

Comments
 (0)