mirror of
https://github.com/ghndrx/gregh.dev.git
synced 2026-02-10 06:44:57 +00:00
add semantic pr, updated folder for src
This commit is contained in:
10
.github/workflows/deployment.yaml
vendored
10
.github/workflows/deployment.yaml
vendored
@@ -1,7 +1,9 @@
|
|||||||
run-name: "☁️ CF › Deploy"
|
run-name: "☁️ CF › Deploy"
|
||||||
name: "☁️ CF › Deploy"
|
name: "☁️ CF › Deploy"
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [closed]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
job-publish:
|
job-publish:
|
||||||
@@ -11,7 +13,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
deployments: write
|
deployments: write
|
||||||
steps:
|
steps:
|
||||||
- name: "☑️ Checkout"
|
- name: "Checkout"
|
||||||
id: task_publish_checkout
|
id: task_publish_checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -21,8 +23,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} # Cloudflare API Token from https://dash.cloudflare.com/profile/api-tokens
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} # Cloudflare API Token from https://dash.cloudflare.com/profile/api-tokens
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} # Cloudflare account ID shown on the right side of the CF website
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} # Cloudflare account ID shown on the right side of the CF website
|
||||||
projectName: ${{ variables.PROJECT_NAME }} # Project name assigned during creation (see Workers & Pages section)
|
projectName: ${{ vars.PROJECT_NAME }} # Project name assigned during creation (see Workers & Pages section)
|
||||||
directory: . # The directory where your built site is located
|
directory: src/ # The directory where your built site is located
|
||||||
branch: main # The branch to deploy; defaults to the branch triggering the workflow
|
branch: main # The branch to deploy; defaults to the branch triggering the workflow
|
||||||
workingDirectory: . # Working directory relative to the repository root
|
workingDirectory: . # Working directory relative to the repository root
|
||||||
wranglerVersion: '3' # Optional: Specify a Wrangler version (e.g. '3' or 'beta')
|
wranglerVersion: '3' # Optional: Specify a Wrangler version (e.g. '3' or 'beta')
|
||||||
|
|||||||
45
.github/workflows/semantic-pr.yaml
vendored
Normal file
45
.github/workflows/semantic-pr.yaml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: "Semantic Lint PR"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- edited
|
||||||
|
- synchronize
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
name: Validate PR title
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: amannn/action-semantic-pull-request@v5
|
||||||
|
id: lint_pr_title
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: marocchino/sticky-pull-request-comment@v2
|
||||||
|
# When the previous steps fails, the workflow would stop. By adding this
|
||||||
|
# condition you can continue the execution with the populated error message.
|
||||||
|
if: always() && (steps.lint_pr_title.outputs.error_message != null)
|
||||||
|
with:
|
||||||
|
header: pr-title-lint-error
|
||||||
|
message: |
|
||||||
|
Hey there and thank you for opening this pull request! 👋🏼
|
||||||
|
|
||||||
|
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
|
||||||
|
|
||||||
|
Details:
|
||||||
|
|
||||||
|
```
|
||||||
|
${{ steps.lint_pr_title.outputs.error_message }}
|
||||||
|
```
|
||||||
|
|
||||||
|
# Delete a previous comment when the issue has been resolved
|
||||||
|
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
|
||||||
|
uses: marocchino/sticky-pull-request-comment@v2
|
||||||
|
with:
|
||||||
|
header: pr-title-lint-error
|
||||||
|
delete: true
|
||||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user