Skip to content

Add missing license headers #65

Add missing license headers

Add missing license headers #65

Workflow file for this run

# Copyright (c) 2023 Paul Barker <paul@pbarker.dev>
# SPDX-License-Identifier: Apache-2.0
name: Build website
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install Tailwind CSS
run: |
wget "https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.1/tailwindcss-linux-x64" -O /usr/local/bin/tailwindcss
chmod a+x /usr/local/bin/tailwindcss
- name: Build website with Pelican
run: |
if [[ $GITHUB_REF == 'refs/heads/main' ]]; then
inv build --prod
else
inv build
fi
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: public
path: public
deploy:
name: Deploy
needs: build
if: github.repository == 'unnecessary-abstraction/pbarker.dev'
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: public
path: public
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: pbarker
directory: public
branch: ${{ github.ref_name }}