Prep for opening repo publicly #21
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
on: [push] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
name: Deploy to Cloudflare Pages | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Not currently needed, but will in near future | |
- name: NodeJS setup | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Install dependencies | |
run: npm install | |
# Testing Turborepo - probably overkill - NPM Workspaces would work just fine as well | |
# v0 POC target web app only | |
- name: Lint | |
run: npx turbo run lint --filter=web | |
- name: Build | |
run: npx turbo run build --filter=web | |
env: | |
WORKER_URL: ${{ secrets.WORKER_URL }} | |
PROFILES_API_ENDPOINT: ${{ secrets.PROFILES_API_ENDPOINT }} | |
AUTH_PRIVATE_KEY: ${{ secrets.AUTH_PRIVATE_KEY }} | |
- name: Publish | |
uses: cloudflare/pages-action@1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
workingDirectory: "./apps/web" | |
directory: ".svelte-kit/cloudflare" | |
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
wranglerVersion: "3" |