提交build

This commit is contained in:
postyizhan 2024-03-23 13:55:53 +08:00
parent 4a6606b847
commit d757b3f143

View File

@ -7,12 +7,6 @@ jobs:
# 自动部署GitPage # 自动部署GitPage
gitpage: gitpage:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# https://segmentfault.com/q/1010000043363115
permissions:
contents: read
pull-requests: write
steps: steps:
# 拉取代码 # 拉取代码
- name: Checkout - name: Checkout
@ -29,75 +23,73 @@ jobs:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages BRANCH: gh-pages
FOLDER: build FOLDER: build
# 自动生成PDF
# # 自动生成PDF pdf:
# pdf: needs: [ gitpage ]
# needs: [ gitpage ] runs-on: ubuntu-latest
# runs-on: ubuntu-latest steps:
# steps: # 拉取代码
# # 拉取代码 - name: Checkout
# - name: Checkout uses: actions/checkout@master
# uses: actions/checkout@master with:
# with: persist-credentials: false
# persist-credentials: false # 睡会儿, 等GitPage部署完成
# # 睡会儿, 等GitPage部署完成 - name: Sleep for 120 seconds
# - name: Sleep for 120 seconds run: sleep 120s
# run: sleep 120s shell: bash
# shell: bash # 生成PDF
# # 生成PDF - name: Build PDF
# - name: Build PDF run: sudo docker run --rm -v ${{ github.workspace }}/pdf:/app/pdf iseason/docusaurus-to-pdf -u https://postyizhan.github.io/Dumb_Service_Guide/intro --output pdf/Folia-Tutorials.pdf
# run: sudo docker run --rm -v ${{ github.workspace }}/pdf:/app/pdf iseason/docusaurus-to-pdf -u https://neige7.github.io/Banker-Wiki/intro --output pdf/Banker-Wiki.pdf # 生成英文PDF
# # 生成英文PDF # - name: Build English PDF
# # - name: Build English PDF # run: sudo docker run --rm -v ${{ github.workspace }}/pdf:/app/pdf iseason/docusaurus-to-pdf -u https://neige7.github.io/Banker-Wiki/en/intro --output pdf/Banker-Wiki-English.pdf
# # run: sudo docker run --rm -v ${{ github.workspace }}/pdf:/app/pdf iseason/docusaurus-to-pdf -u https://neige7.github.io/Banker-Wiki/en/intro --output pdf/Banker-Wiki-English.pdf # 上传PDF
# # 上传PDF - name: Capture Build Artifacts
# - name: Capture Build Artifacts uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v3 with:
# with: name: Artifacts
# name: Artifacts path: pdf/
# path: pdf/ if-no-files-found: error
# if-no-files-found: error # Release
# # Release release:
# release: needs: [ pdf ]
# needs: [ pdf ] runs-on: ubuntu-latest
# runs-on: ubuntu-latest steps:
# steps: # 拉取代码
# # 拉取代码 - name: Checkout Repository
# - name: Checkout Repository uses: actions/checkout@v2
# uses: actions/checkout@v2 # 下载本体
# # 下载本体 - name: Download Content
# - name: Download Content uses: actions/download-artifact@v2
# uses: actions/download-artifact@v2 with:
# with: name: Artifacts
# name: Artifacts # 获取序号
# # 获取序号 - name: Get Project version
# - name: Get Project version id: get_version
# id: get_version run: |
# run: | echo "Project version: $GITHUB_RUN_NUMBER"
# echo "Project version: $GITHUB_RUN_NUMBER" echo "::set-output name=project_version::$GITHUB_RUN_NUMBER"
# echo "::set-output name=project_version::$GITHUB_RUN_NUMBER" env:
# env: project_version: ${{ steps.get_version.outputs.project_version }}
# project_version: ${{ steps.get_version.outputs.project_version }} # 创建release
# # 创建release - name: Create Release
# - name: Create Release id: create-new-release
# id: create-new-release uses: actions/create-release@v1
# uses: actions/create-release@v1 env:
# env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with:
# with: tag_name: ${{ steps.get_version.outputs.project_version }}
# tag_name: ${{ steps.get_version.outputs.project_version }} release_name: Auto Release ${{ steps.get_version.outputs.project_version }}
# release_name: Auto Release ${{ steps.get_version.outputs.project_version }} # 向release上传Banker-Wiki.pdf
# # 向release上传Banker-Wiki.pdf - name: Upload PDF file to Release
# - name: Upload PDF file to Release uses: actions/upload-release-asset@v1
# uses: actions/upload-release-asset@v1 env:
# env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with:
# with: upload_url: ${{ steps.create-new-release.outputs.upload_url }}
# upload_url: ${{ steps.create-new-release.outputs.upload_url }} asset_path: Folia-Tutorials.pdf
# asset_path: Banker-Wiki.pdf asset_name: Folia-Tutorials.pdf
# asset_name: Banker-Wiki.pdf asset_content_type: application/zip
# asset_content_type: application/zip
# 向release上传Banker-Wiki-English.pdf # 向release上传Banker-Wiki-English.pdf
# - name: Upload PDF file to Release # - name: Upload PDF file to Release
# uses: actions/upload-release-asset@v1 # uses: actions/upload-release-asset@v1