Skip to content

Update CICD.yml

Update CICD.yml #9

Workflow file for this run

name: Continuous Build
on:
push:
branches:
- '**' # This will trigger the workflow on push to any branch
pull_request:
branches:
- '**' # This will trigger the workflow on pull requests to any branch
release:
types: [created] # This will trigger the workflow when a release is created
jobs:
build:
name: Build Website
runs-on: ubuntu-latest
steps:
- 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: us-east-1
- name: Checkout code
uses: actions/checkout@v3 # This will checkout the repository containing the workflow
- uses: actions/checkout@v3
with:
repository: leoncvlt/loconotion
path: loconotion
- name: Copy Config File
run: cp personal_site/personal_site_config.toml loconotion/personal_site_config.toml
shell: bash
- name: Build
run: |
cd loconotion
pip3 install -r requirements.txt
python3 loconotion personal_site_config.toml
- name: S3 Deploy
run: |
aws s3 sync ./loconotion/dist/Nasrudin_Salim s3://${{ secrets.BUCKET_NAME }}
- name: Purge cache
uses: jakejarvis/cloudflare-purge-action@master
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}