Merge pull request #3340 from fshowalter/renovate/lock-file-maintenance #2502
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: build & deploy | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: setup node | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "npm" | |
- name: setup npm | |
run: | | |
./npm_use.sh && | |
npm --version && | |
npm list -g --depth 0 | |
- name: install dependencies | |
run: npm ci | |
- name: get astro cache | |
id: astro-cache-build | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: | | |
node_modules | |
.astro | |
key: ${{ runner.os }}-astro-cache-v2-${{ github.run_id }} | |
restore-keys: | | |
${{ runner.os }}-astro-cache-v2- | |
- name: build | |
run: npm run build | |
- name: add indexNow key | |
env: | |
INDEXNOW_KEY: ${{ secrets.INDEXNOW_KEY }} | |
run: echo $INDEXNOW_KEY > dist/$INDEXNOW_KEY.txt | |
- name: deploy | |
uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654 # v3.0 | |
with: | |
publish-dir: "./dist" | |
production-branch: main | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
enable-pull-request-comment: true | |
enable-commit-comment: true | |
overwrites-pull-request-comment: true | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 5 |