No need to install AWS CLI #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
env: | |
SHELL: /bin/bash | |
GP_REPO_PATH: tanayseven.github.io/ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2.3.1 | |
with: | |
python-version: "3.10" | |
- name: Install all the dependencies | |
run: | | |
echo "Installed Python version: "`python --version` | |
pip install -r requirements.txt | |
- name: Build the project | |
run: | | |
export GOOGLE_ANALYTICS_ID=${{ secrets.GOOGLE_ANALYTICS_ID }} | |
make clean && make html | |
- name: Deploy to AWS bucket | |
run: aws s3 sync _build/html s3://blog.tanay.tech --delete | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: us-east-1 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v2.5.0 | |
with: | |
node-version: 16.6.1 | |
- name: Run lighthouse performance | |
run: | | |
npx --yes lighthouse-badges --version | |
npx --yes lighthouse-badges --url "https://blog.tanay.tech/" -o test_results | |
- name: Install Netlify CLI | |
run: npm install netlify-cli -g | |
- name: Publish the performance badges to Netlify | |
run: netlify deploy --auth=${{ secrets.NETLIFY_TOKEN }} --dir=test_results/ --site=tanayseven-badges-personal-website.netlify.app |