Skip to content

Commit

Permalink
test deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
flo-bit committed Oct 26, 2024
1 parent 7e5c7db commit 64446ba
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 26 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -36,4 +38,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
5 changes: 3 additions & 2 deletions src/config.json
Original file line number Diff line number Diff line change
@@ -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": "🙃",
Expand Down
15 changes: 0 additions & 15 deletions src/content/blog/test.md

This file was deleted.

0 comments on commit 64446ba

Please sign in to comment.