mirror of
https://github.com/Snigdha-OS/Snigdha-OS.github.io.git
synced 2025-09-06 12:45:18 +02:00
🛠️ build(astro): build with astro
This commit is contained in:
38
.github/workflows/conventional-commit.yml
vendored
38
.github/workflows/conventional-commit.yml
vendored
@@ -1,38 +0,0 @@
|
||||
name: Check Conventional Commit
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
check-commit-message:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Check Conventional Commit
|
||||
run: |
|
||||
# Define the conventional commit types with emojis
|
||||
TYPES=("🎉 feat" "🐞 fix" "📚 docs" "💅 style" "🔨 refactor" "⚡️ perf" "🧪 test" "🛠️ build" "🤖 ci" "🧹 chore" "⏪️ revert")
|
||||
|
||||
# Extract the commit type and emoji from the commit message
|
||||
COMMIT_MSG=$(git log --format=%B -n 1)
|
||||
for type in "${TYPES[@]}"; do
|
||||
type_emoji=${type}
|
||||
type=${type_emoji#* }
|
||||
emoji=${type_emoji% *}
|
||||
if [[ $COMMIT_MSG == $emoji* ]]; then
|
||||
echo "Commit message is a conventional commit"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
# If we reach here, the commit message is not a conventional commit
|
||||
echo "Commit message is not a conventional commit"
|
||||
exit 1
|
39
.github/workflows/deploy.yml
vendored
39
.github/workflows/deploy.yml
vendored
@@ -1,39 +0,0 @@
|
||||
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: [ master ]
|
||||
# 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
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout your repository using git
|
||||
uses: actions/checkout@v4
|
||||
- name: Install, build, and upload your site
|
||||
uses: withastro/action@v2
|
||||
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
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
Reference in New Issue
Block a user