Skip to content

Commit 658d1a6

Browse files
authored
chore(ci): Fix LSP CI workflow (#207)
1 parent 62c797c commit 658d1a6

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/lsp.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,24 @@ jobs:
2020
git config --global user.name "github-actions[bot]"
2121
git config --global user.email "github-actions[bot]@users.noreply.github.com"
2222
23+
- name: GitHub Login
24+
if: ${{ github.event_name == 'push' }}
25+
run: |
26+
echo "${{ secrets.GH_TOKEN }}" > token.txt
27+
gh auth login --with-token < token.txt
28+
2329
- name: Clone LSP repo
30+
if: ${{ github.event_name != 'push' }}
2431
run: |
2532
git clone https://github.com/makim-org/makim-lsp.git
33+
34+
- name: Clone LSP repo
35+
if: ${{ github.event_name == 'push' }}
36+
run: |
37+
gh repo clone makim-org/makim-lsp
38+
39+
- name: Create a new branch
40+
run: |
2641
cd makim-lsp
2742
git checkout -b sync-schema-$(date +%s)
2843
cp ../src/makim/schema.json ./packages/language-server/src/schema/makim.schema.json
@@ -36,10 +51,6 @@ jobs:
3651
git commit -m "chore(schema): sync from Makim"
3752
3853
git push origin main
39-
40-
echo "${{ secrets.GH_TOKEN }}" > token.txt
41-
42-
gh auth login --with-token < token.txt
4354
gh pr create \
4455
--body "This PR was automatically generated by a GitHub Action to sync `schema.json` from the Makim repo." \
4556
--title "Sync schema.json from Makim" \

0 commit comments

Comments
 (0)