ci: Update FUNDING.yml #213
This file contains hidden or 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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
env: | |
BUILDX_VERSION: latest | |
BUILDKIT_IMAGE: wcjiang/html-tutorial | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm install | |
- run: npm run build | |
- name: Generate Contributors Images | |
uses: jaywcjlove/github-action-contributors@main | |
with: | |
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) | |
output: dist/CONTRIBUTORS.svg | |
avatarSize: 42 | |
- name: Create Tag | |
id: create_tag | |
uses: jaywcjlove/create-tag-action@main | |
with: | |
package-path: ./package.json | |
- name: get tag version | |
id: tag_version | |
uses: jaywcjlove/changelog-generator@main | |
- name: Deploy Website | |
uses: peaceiris/actions-gh-pages@v4 | |
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: ./dist | |
- name: Generate Changelog | |
id: changelog | |
uses: jaywcjlove/changelog-generator@main | |
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: | |
allowUpdates: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: ${{ steps.create_tag.outputs.version }} | |
tag: ${{ steps.create_tag.outputs.version }} | |
body: | | |
[](https://jaywcjlove.github.io/#/sponsor) []() [](https://hub.docker.com/r/wcjiang/html-tutorial) [](https://hub.docker.com/r/wcjiang/html-tutorial) [](https://hub.docker.com/r/wcjiang/html-tutorial) | |
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/html-tutorial/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html | |
Comparing Changes: ${{ steps.changelog.outputs.compareurl }} | |
${{ steps.changelog.outputs.changelog }} | |
## Docker | |
通过 Docker 快速简单的部署文档网站。 | |
```bash | |
docker pull wcjiang/html-tutorial | |
``` | |
```bash | |
docker run --name html-tutorial --rm -d -p 9665:80 wcjiang/html-tutorial:latest | |
# Or | |
docker run --name html-tutorial -itd -p 9665:80 wcjiang/html-tutorial:latest | |
``` | |
在浏览器中访问以下 URL | |
```bash | |
http://localhost:9665/ | |
``` | |
# Create Docker Image | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push image:latest | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ secrets.DOCKER_USER }}/html-tutorial:latest | |
- name: Build and push image:tags | |
uses: docker/build-push-action@v6 | |
if: steps.create_tag.outputs.successful | |
with: | |
push: true | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ secrets.DOCKER_USER }}/html-tutorial:${{steps.changelog.outputs.version}} | |
# - name: Build docs image | |
# if: steps.create_tag.outputs.successful | |
# run: docker image build -t html-tutorial . | |
# - name: Tags & Push image | |
# if: steps.create_tag.outputs.successful | |
# run: | | |
# echo "outputs.tag - ${{ steps.changelog.outputs.version }}" | |
# docker tag html-tutorial ${{ secrets.DOCKER_USER }}/html-tutorial:${{steps.changelog.outputs.version}} | |
# docker tag html-tutorial ${{ secrets.DOCKER_USER }}/html-tutorial:latest | |
# docker push ${{ secrets.DOCKER_USER }}/html-tutorial:${{steps.changelog.outputs.version}} | |
# docker push ${{ secrets.DOCKER_USER }}/html-tutorial:latest | |
# Create Docker Image in Github | |
# - name: Login to the GitHub Container Registry | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Build and push image:latest | |
# uses: docker/build-push-action@v3 | |
# with: | |
# push: true | |
# context: . | |
# platforms: linux/amd64,linux/arm64 | |
# tags: ghcr.io/jaywcjlove/html-tutorial:latest | |
# - name: Build and push image:tags | |
# uses: docker/build-push-action@v3 | |
# if: steps.create_tag.outputs.successful | |
# with: | |
# push: true | |
# context: . | |
# platforms: linux/amd64,linux/arm64 | |
# tags: ghcr.io/jaywcjlove/html-tutorial:${{steps.changelog.outputs.version}} | |
# - name: Login to GitHub registry | |
# run: echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
# - name: Build docker image | |
# run: docker build -t ghcr.io/jaywcjlove/html-tutorial:latest . | |
# - name: Publish to GitHub registry | |
# run: docker push ghcr.io/jaywcjlove/html-tutorial:latest | |
# - name: Tag docker image (beta) and publish to GitHub registry | |
# if: steps.create_tag.outputs.successful | |
# run: | | |
# echo "version: v${{ steps.changelog.outputs.version }}" | |
# docker tag ghcr.io/jaywcjlove/html-tutorial:latest ghcr.io/jaywcjlove/html-tutorial:${{steps.changelog.outputs.version}} | |
# docker push ghcr.io/jaywcjlove/html-tutorial:${{steps.changelog.outputs.version}} |