-
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.06 KB
/
devto.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
# cf.
# https://github.com/sinedied/devto-github-template/blob/97faa6bb3bb95648725000f06e880b805fcd9d1f/.github/workflows/publish.yml
# https://github.com/sinedied/publish-devto/tree/98bd0175f3eee39b6f83aa12deccfaba2dc9498f#usage
name: "GitHub to dev.to"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
devto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Publish articles on dev.to"
uses: sinedied/publish-devto@v2
id: publish_devto
with:
devto_key: ${{ secrets.DEVTO_ACCESS_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
files: "articles/en/*.md"
branch: main
conventional_commits: true
dry_run: ${{ github.event_name == 'pull_request' }}
- uses: actions-ecosystem/action-create-comment@v1
if: ${{ github.event_name == 'pull_request' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
body: |
Changes result:
```
${{ steps.publish_devto.outputs.result_summary }}
```