Skip to content

update "content" submodule [skip linting] #447

update "content" submodule [skip linting]

update "content" submodule [skip linting] #447

# Builds the site on GitHub because GitHub offers 2000 free CI/CD minutes, while Netlify offers 300.
# See: https://bennypowers.dev/posts/cheap-netlify-11ty-rebuilds/
name: Rebuild Netlify site
env:
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }}
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }}
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
# Netlify settings "Site name"
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
# Netlify personal access token created here: https://app.netlify.com/user/applications
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
on:
push:
branches:
- main
paths:
- '.github/workflows/rebuild-and-publish-to-netlify.yaml'
- 'public/**'
- 'src/**'
- .eleventy.js
- .eleventyignore
- .gitignore
- netlify.toml
- postcss.config.js
- tailwind.config.js
jobs:
rebuild:
runs-on: ubuntu-latest
name: Rebuild site
steps:
- uses: actions/checkout@v3
with:
repository: ooloth/michaeluloth.com
token: ${{ secrets.ACTIONS_TOKEN }}
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
# use cached node_modules if found (instead of running npm install)
- run: npm ci --prefer-offline
- run: npm run build
- name: Publish to Netlify
# Deploy updated "_site" folder to production Netlify branch
run: npx netlify-cli deploy --prod --message "deploy from GitHub Action" --dir=_site