hn-api data fetch #6
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: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: deploy | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v2 | |
- name: Install Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Install pnpm and node_modules | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
run_install: true | |
- name: Build site | |
run: pnpm build | |
- name: Deploy to Deno Deploy | |
uses: denoland/deployctl@v1 | |
with: | |
project: hn-svelte-deno # Replace with your project name | |
entrypoint: 'build/index.js' |