diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..85a435e2 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,25 @@ +name: Build + +on: + push: + paths: + - 'build/**/' + - 'legacy/*' + - 'package.json' + - 'src/**/*' + - '.github/workflows/build.yaml' + +jobs: + build: + name: Build CSS + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Bun + uses: oven-sh/setup-bun@v1 + + - name: Build + run: make diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b3f31d79..378c6891 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -23,10 +23,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 - - name: Install dependencies - run: npm ci + - name: Install Bun + uses: oven-sh/setup-bun@v1 - name: Install doctl uses: digitalocean/action-doctl@v2 @@ -34,7 +34,7 @@ jobs: token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} - name: Build - run: ./build.sh + run: make - name: Upload artifact uses: actions/upload-pages-artifact@v3 @@ -45,6 +45,9 @@ jobs: uses: actions/deploy-pages@v4 id: deployment + - name: Clean up for S3 + run: make clean-up-s3 + - name: Upload to S3 run: | export sync_args=( "--delete" "--acl" "public-read" "dist" "s3://${{ vars.AWS_S3_BUCKET }}/${{ env.BUCKET_PATH }}" )