Skip to content

Commit

Permalink
Merge branch 'main' into seo
Browse files Browse the repository at this point in the history
  • Loading branch information
maehr authored Jan 29, 2024
2 parents 08908ff + d983bc6 commit 3f5ac56
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/sveltekitci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ on:
workflow_dispatch: null
repository_dispatch:
jobs:
build:
sveltekitci:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -44,7 +47,7 @@ jobs:
- name: Lint
run: pnpm run lint
- name: Setup jampack cache
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && github.repository == 'Stadt-Geschichte-Basel/stadtgeschichtebasel.ch'
uses: actions/cache@v3
with:
path: .jampack
Expand All @@ -56,33 +59,20 @@ jobs:
- name: Build
run: pnpm run build
- name: Postbuild
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && github.repository == 'Stadt-Geschichte-Basel/stadtgeschichtebasel.ch'
run: pnpm run postbuild
- name: Test
run: pnpm run test
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: '${{ steps.deployment.outputs.page_url }}'
steps:
- name: Publish to Cloudflare Pages
if: >-
github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
&& github.repository ==
'Stadt-Geschichte-Basel/stadtgeschichtebasel.ch'
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && github.repository == 'Stadt-Geschichte-Basel/stadtgeschichtebasel.ch'
uses: cloudflare/pages-action@v1
with:
apiToken: '${{ secrets.CLOUDFLARE_API_TOKEN }}'
accountId: '${{ secrets.CLOUDFLARE_ACCOUNT_ID }}'
projectName: stadtgeschichtebasel-ch
directory: build
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# gitHubToken: '${{ secrets.GITHUB_TOKEN }}'
# Optional: Switch what branch you are publishing to.
# By default this will be the branch which triggered this workflow
branch: main
Expand Down
7 changes: 6 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ const config = {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter()
adapter: adapter(),
// do not abort on build errors
prerender: {
handleHttpError: 'warn',
handleMissingId: 'warn'
}
}
};
export default config;

0 comments on commit 3f5ac56

Please sign in to comment.