Fix License #73
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 website 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: 20.11.0 | |
- name: Run lighthouse performance | |
run: | | |
npx --yes lighthouse-badges --version | |
npx --yes lighthouse-badges --url "https://blog.tanay.tech/" -o test_results | |
- name: Deploy lighthouse metrics to AWS bucket | |
run: aws s3 sync test_results s3://blog.tanay.tech/test_results/ | |
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 |