removed netlify, added cf pages
Einige Prüfungen sind fehlgeschlagen
Deploy Zola site to Cloudflare Pages / build-and-deploy (push) Has been cancelled
Einige Prüfungen sind fehlgeschlagen
Deploy Zola site to Cloudflare Pages / build-and-deploy (push) Has been cancelled
Dieser Commit ist enthalten in:
Ursprung
690b1a3b20
Commit
a829dcf345
2 geänderte Dateien mit 40 neuen und 21 gelöschten Zeilen
40
.github/workflows/cfpages-deploy.yml
gevendort
Normale Datei
40
.github/workflows/cfpages-deploy.yml
gevendort
Normale Datei
|
@ -0,0 +1,40 @@
|
|||
name: Deploy Zola site to Cloudflare Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-22.04:docker://node:20-bullseye
|
||||
|
||||
steps:
|
||||
# 1. Checkout the repository code
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 2. Install Zola
|
||||
- name: Install Zola
|
||||
run: |
|
||||
ZOLA_VERSION="0.20.0"
|
||||
curl -fL -o zola.tar.gz https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz
|
||||
tar -xzf zola.tar.gz
|
||||
chmod +x zola
|
||||
sudo mv zola /usr/local/bin/
|
||||
|
||||
# 3. Build the site with Zola
|
||||
- name: Build site with Zola
|
||||
run: |
|
||||
zola build --output-dir public
|
||||
|
||||
# 4. Install Wrangler CLI
|
||||
- name: Install Wrangler
|
||||
run: |
|
||||
npm install -g @cloudflare/wrangler
|
||||
|
||||
# 5. Publish to Cloudflare Pages using Wrangler
|
||||
- name: Deploy to Cloudflare Pages
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
run: |
|
||||
wrangler pages publish public --project-name u42
|
21
netlify.toml
21
netlify.toml
|
@ -1,21 +0,0 @@
|
|||
# example netlify.toml
|
||||
[build]
|
||||
command = "zola build"
|
||||
functions = "netlify/functions"
|
||||
publish = "public"
|
||||
|
||||
## Uncomment to use this redirect for Single Page Applications like create-react-app.
|
||||
## Not needed for static site generators.
|
||||
#[[redirects]]
|
||||
# from = "/*"
|
||||
# to = "/index.html"
|
||||
# status = 200
|
||||
|
||||
## (optional) Settings for Netlify Dev
|
||||
## https://github.com/netlify/cli/blob/main/docs/netlify-dev.md#project-detection
|
||||
#[dev]
|
||||
# command = "yarn start" # Command to start your dev server
|
||||
# port = 3000 # Port that the dev server will be listening on
|
||||
# publish = "dist" # Folder with the static content for _redirect file
|
||||
|
||||
## more info on configuring this file: https://ntl.fyi/file-based-build-config
|
Laden …
Tabelle hinzufügen
In neuem Issue referenzieren