-
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (36 loc) · 1.01 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Publish articles
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
publish_articles:
runs-on: ubuntu-latest
environment: publish
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT_CHECKOUT }}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "npm"
- run: npm ci
- run: npx qiita publish --all
env:
QIITA_TOKEN: ${{ secrets.QIITA_TOKEN }}
- run: npm run lint:fix
- run: |
git add ./public/*
if ! git diff --staged --exit-code --quiet; then
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git commit -m 'Updated by qiita-cli'
git push --force
fi