Skip to content

Commit

Permalink
更新workflow, using node20
Browse files Browse the repository at this point in the history
  • Loading branch information
2secRain committed Mar 24, 2024
1 parent 15b8441 commit 4030e5c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 28 deletions.
41 changes: 19 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build Writerside docs using Docker
uses: JetBrains/writerside-github-action@v4
Expand All @@ -48,7 +48,7 @@ jobs:
docker-version: ${{ env.DOCKER_VERSION }}

- name: Upload documentation
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: |
Expand All @@ -58,7 +58,7 @@ jobs:

# Add the step below to upload Algolia indexes
- name: Upload algolia-indexes
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: algolia-indexes
path: artifacts/${{ env.ALGOLIA_ARTIFACT }}
Expand All @@ -72,7 +72,7 @@ jobs:

steps:
- name: Download artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: docs
path: artifacts
Expand All @@ -91,26 +91,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docs

- name: Unzip artifact
uses: montudor/action-zip@v1
with:
args: unzip -qq ${{ env.ARTIFACT }} -d dir
run: unzip -O UTF-8 -qq '${{ env.ARTIFACT }}' -d dir

- name: Setup Pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: dir

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4

publish-indexes:
needs: deploy
Expand All @@ -119,19 +117,18 @@ jobs:
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-2

steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: algolia-indexes
- uses: montudor/action-zip@v1
with:
args: unzip -qq ${{ env.ALGOLIA_ARTIFACT }} -d algolia-indexes
- run: |
env "algolia-key=${{env.ALGOLIA_KEY}}" java -jar /opt/builder/help-publication-agent.jar \
- name: Unzip artifact
run: |
unzip -O UTF-8 -qq '${{ env.ALGOLIA_ARTIFACT }}' -d algolia-indexes
env algolia-key='${{env.ALGOLIA_KEY}}' java -jar /opt/builder/help-publication-agent.jar \
update-index \
--application-name ${{env.ALGOLIA_APP_NAME}} \
--index-name ${{env.ALGOLIA_INDEX_NAME}} \
--product ${{env.CONFIG_JSON_PRODUCT}} \
--version ${{env.CONFIG_JSON_VERSION}} \
--application-name '${{env.ALGOLIA_APP_NAME}}' \
--index-name '${{env.ALGOLIA_INDEX_NAME}}' \
--product '${{env.CONFIG_JSON_PRODUCT}}' \
--version '${{env.CONFIG_JSON_VERSION}}' \
--index-directory algolia-indexes/ \
2>&1 | tee algolia-update-index-log.txt
11 changes: 5 additions & 6 deletions Writerside/topics/about.topic
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,11 @@
<chapter title="GitHub Actions" id="gh-actions" collapsible="true" default-state="collapsed">
<a href="https://github.com/PieTech-WS/OpenWearWiki/blob/master/.github/workflows/deploy.yml">查看Workflow文件</a>
<list>
<li>actions/upload-artifact@v3</li>
<li>actions/checkout@v3</li>
<li>actions/download-artifact@v1</li>
<li>actions/upload-pages-artifact@v1</li>
<li>actions/configure-pages@v2</li>
<li>montudor/action-zip@v1</li>
<li>actions/upload-artifact@v4</li>
<li>actions/checkout@v4</li>
<li>actions/download-artifact@v4</li>
<li>actions/upload-pages-artifact@v3</li>
<li>actions/configure-pages@v4</li>
<li>JetBrains/writerside-github-action@v4</li>
<li>registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-2</li>
<li>Docker Image Version(Updated on 24/2/20):233.14389</li>
Expand Down

0 comments on commit 4030e5c

Please sign in to comment.