新しい技術記事を追加 #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 }} | |
``` |