Merge to Master #227
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
# This is a basic workflow to automatically build a Svelte app and deploy it to GitHub Pages | |
name: Merge to Master | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 5 * * *' | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
DIRECT_DATABASE_URL: ${{ secrets.DIRECT_DATABASE_URL }} | |
REDIS_TOKEN: ${{ secrets.REDIS_TOKEN }} | |
REDIS_URL: ${{ secrets.REDIS_URL }} | |
IMAGE_API_TOKEN: ${{ secrets.IMAGE_API_TOKEN }} | |
IMAGE_API: ${{ secrets.IMAGE_API }} | |
PUBLIC_IMAGE_DELIVERY: ${{ secrets.PUBLIC_IMAGE_DELIVERY }} | |
IS_CI: true | |
jobs: | |
PUBLISH: | |
name: Publish to Production | |
environment: PRODUCTION | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8.9.2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'pnpm' | |
- name: Install | |
run: | | |
pnpm install | |
- name: Build | |
env: | |
IS_CI: false | |
run: | | |
pnpm build:prod | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: cloudkit | |
directory: ./.svelte-kit/cloudflare | |
# Optional: Enable this if you want to have GitHub Deployments triggered | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
# Optional: Switch what branch you are publishing to. | |
# By default this will be the branch which triggered this workflow | |
# branch: master | |
# Optional: Change the working directory | |
# workingDirectory: my-site | |
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta` | |
wranglerVersion: '3' |