Skip to content

Commit

Permalink
perf: Open PR only when create
Browse files Browse the repository at this point in the history
  • Loading branch information
atsuyaw committed Oct 22, 2024
1 parent 50870f1 commit e30b46e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy GitHub Pages
name: Build GitHub Pages

"on": [push, workflow_dispatch]

Expand All @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
submodules: false # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Setup Go
Expand All @@ -26,11 +26,9 @@ jobs:
hugo-version: '0.135.0'
extended: true

- name: Build hugo site
run: hugo --minify
- run: hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: Lint

"on":
push:
branches: ["Notting"]
# branches-ignore:
# - main
# tags:
# - "*"
branches-ignore:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -18,6 +15,7 @@ jobs:
permissions:
contents: write
pull-requests: write
if: ${{ github.ref }} == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Run markdownlint-cli2-action@v17
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
name: Release

"on":
push:
branches-ignore:
- main
tags:
- "*"
"on": ["create"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GH_TOKEN: ${{ github.token }}

jobs:
openPR:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Create PR
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr create \
--base "main" \
--head "${{ github.ref_name }}" \
--title "Release/${{ github.ref_name }}" \
--body "GitHub actions" \
--body "" \
--draft

0 comments on commit e30b46e

Please sign in to comment.