From 64446ba00f571d146df460c2faa08e993286385b Mon Sep 17 00:00:00 2001 From: Florian <45694132+flo-bit@users.noreply.github.com> Date: Sat, 26 Oct 2024 20:31:28 +0200 Subject: [PATCH] test deploy --- .github/workflows/deploy.yml | 20 +++++++++++--------- src/config.json | 5 +++-- src/content/blog/test.md | 15 --------------- 3 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 src/content/blog/test.md diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 979b6df..b45a8ab 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,14 +1,10 @@ name: Deploy to GitHub Pages on: - # Trigger the workflow every time you push to the `main` branch - # Using a different branch name? Replace `main` with your branch’s name push: branches: [ main ] - # Allows you to run this workflow manually from the Actions tab on GitHub. workflow_dispatch: -# Allow this job to clone the repo and create a page deployment permissions: contents: read pages: write @@ -20,12 +16,18 @@ jobs: steps: - name: Checkout your repository using git uses: actions/checkout@v4 + + - name: Set SITE and BASE values if MANUAL_SITE_BASE is false + run: | + if jq '.MANUAL_SITE_BASE == false' src/config.json; then + SITE="https://$GITHUB_ACTOR.github.io" + BASE="/${GITHUB_REPOSITORY#*/}" + jq --arg SITE "$SITE" --arg BASE "$BASE" \ + '.SITE = $SITE | .BASE = $BASE' src/config.json > tmp.$$.json && mv tmp.$$.json src/config.json + fi + - name: Install, build, and upload your site uses: withastro/action@v3 - # with: - # path: . # The root location of your Astro project inside the repository. (optional) - # node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional) - # package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) deploy: needs: build @@ -36,4 +38,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4 diff --git a/src/config.json b/src/config.json index 93cd3f0..6a0bf61 100644 --- a/src/config.json +++ b/src/config.json @@ -1,6 +1,7 @@ { - "SITE": "https://flo-bit.github.io", - "BASE": "/blog-template", + "MANUAL_SITE_BASE": false, + "SITE": "https://test.com", + "BASE": "", "SITE_TITLE": "Blog template", "SITE_DESCRIPTION": "Welcome to my website!", "SITE_FAVICON": "🙃", diff --git a/src/content/blog/test.md b/src/content/blog/test.md deleted file mode 100644 index 02d9184..0000000 --- a/src/content/blog/test.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: test -description: testytesty -pubDate: Oct 26 2024 -heroImage: ../../assets/template-1.png ---- -## test 123 - -```svelte -