Skip to content

Commit

Permalink
Merge pull request #1 from jamesx00/build/add-cd
Browse files Browse the repository at this point in the history
cd: add cd process
  • Loading branch information
jamesx00 authored Dec 16, 2024
2 parents 8a7dabd + e8cf3e8 commit fceba30
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 280 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Install dependencies
run: npm install

- name: Deploy
run: npm run deploy
Empty file removed .nojekyll
Empty file.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"tw:watch": "tailwindcss -i public/css/tailwind.input.css -o public/css/tailwind.css --watch",
"debugstart": "DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet",
"benchmark": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy",
"s3:sync": "aws s3 sync _site/ s3://pythonexpert-web/static --profile dataadvantage-admin",
"s3:sync": "aws s3 sync _site/ s3://pythonexpert-web/static",
"cloudfront:clearCache": "aws cloudfront create-invalidation --distribution-id E1WZICBZJ43601 --path \"/*\" --profile dataadvantage-admin",
"deploy": "npm run s3:sync && npm run cloudfront:clearCache"
},
Expand Down Expand Up @@ -44,4 +44,4 @@
"tailwind-highlightjs": "^2.0.1",
"typed.js": "^2.1.0"
}
}
}
Loading

0 comments on commit fceba30

Please sign in to comment.