diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8a9f27..752c109 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,38 +8,59 @@ jobs: build: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 16 - - run: mkdir -p build - - run: cp -rp example build - # - run: npm i markdown-to-html-cli -g - # - run: markdown-to-html --output build/index.html - # - run: markdown-to-html -s shell-regex.md --output build/shell-regex.html + - run: npm install + - run: npm run build + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + - name: Generate Contributors Images uses: jaywcjlove/github-action-contributors@main with: filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) - output: build/CONTRIBUTORS.svg + output: dist/CONTRIBUTORS.svg avatarSize: 42 - - name: Converts Markdown to HTML - uses: jaywcjlove/markdown-to-html-cli@main - with: - source: README.md - output: build/index.html - - - name: Converts Markdown to HTML - uses: jaywcjlove/markdown-to-html-cli@main + - name: Create Tag + id: create_tag + uses: jaywcjlove/create-tag-action@v1.3.6 with: - source: shell-regex.md - output: build/shell-regex.html + package-path: ./package.json - - name: Deploy + - name: Deploy Website uses: peaceiris/actions-gh-pages@v3 with: + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' + commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }} github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build \ No newline at end of file + publish_dir: ./dist + + - name: Generate Changelog + id: changelog + uses: jaywcjlove/changelog-generator@v1.5.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot) + filter: (^[\s]+?[R|r]elease)|(^[R|r]elease) + + - name: Create Release + uses: ncipollo/release-action@v1 + if: steps.create_tag.outputs.successful + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ steps.create_tag.outputs.version }} + tag: ${{ steps.create_tag.outputs.version }} + body: | + Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/vim-web/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html + Comparing Changes: ${{ steps.changelog.outputs.compareurl }} + + ${{ steps.changelog.outputs.changelog }} \ No newline at end of file