ci: clean up and simplify workflows (#1541)

This commit is contained in:
uncenter authored and GitHub committed 2024-12-29 11:02:44 -05:00
1 parent 21bec677c8
commit 2c4eefa877
10 files changed
+43 -59

No files matched your search

+1 -13
View File
@@ -1,13 +1,9 @@
name: CI
on:
workflow_dispatch:
push:
branches: [main]
env:
HAS_USERSTYLES_TOKEN: ${{ secrets.USERSTYLES_TOKEN != '' }}
jobs:
ci:
runs-on: ubuntu-latest
@@ -17,18 +13,11 @@ jobs:
contents: write
# Prevent infinite loops by checking if the last commit was autogenerated.
if: ${{ github.event.commits[0].author.name != 'github-actions' }}
if: ${{ github.repository == 'catppuccin/userstyles' && github.event.commits[0].author.name != 'github-actions' }}
steps:
- uses: actions/checkout@v4
if: env.HAS_USERSTYLES_TOKEN
with:
token: ${{ secrets.USERSTYLES_TOKEN }}
ref: ${{ github.ref }}
fetch-depth: 2
- uses: actions/checkout@v4
if: env.HAS_USERSTYLES_TOKEN == 'false'
with:
ref: ${{ github.ref }}
fetch-depth: 2
- name: Setup Deno
@@ -68,5 +57,4 @@ jobs:
push: false
- name: Push changes
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' && env.HAS_USERSTYLES_TOKEN }}
run: git push origin "HEAD:${{ github.ref }}" --atomic