Skip to content

Commit

Permalink
[cd] handle the installer separately
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Nov 11, 2023
1 parent 0439525 commit 43ae648
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 10 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/cd.installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
push:
branches: main
paths: installer.sh

jobs:
qa:
uses: ./.github/workflows/ci.installer.yml

put:
permissions:
deployments: write
needs: qa
runs-on: ubuntu-latest
steps:
- name: Create Deployment
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
env: installer

- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- run:
aws s3 cp
./installer.sh s3://www.pkgx.sh/installer.sh
--metadata-directive REPLACE
--cache-control no-cache,must-revalidate

- run:
aws cloudfront create-invalidation
--distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
--paths / /installer.sh

- name: Seal Deployment
uses: bobheadxi/deployments@v1
if: always()
with:
env: installer
step: finish
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
10 changes: 0 additions & 10 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- run:
aws s3 cp
./installer.sh s3://www.pkgx.sh/installer.sh
--metadata-directive REPLACE
--cache-control no-cache,must-revalidate
- run:
aws cloudfront create-invalidation
--distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
--paths / /installer.sh

- uses: git-actions/set-user@v1
- run: |
git add dist
Expand Down

0 comments on commit 43ae648

Please sign in to comment.