mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Tidy up Docs CI
This commit is contained in:
10
.github/workflows/docs.yml
vendored
10
.github/workflows/docs.yml
vendored
@ -49,10 +49,10 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
|
DOCS_REPO: platformio/platformio-docs
|
||||||
DOCS_DIR: platformio-docs
|
DOCS_DIR: platformio-docs
|
||||||
LATEST_DOCS_DIR: latest-docs
|
LATEST_DOCS_DIR: latest-docs
|
||||||
RELEASE_BUILD: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
RELEASE_BUILD: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
DOCS_REPO: platformio/platformio-docs
|
|
||||||
if: ${{ github.event_name == 'push' }}
|
if: ${{ github.event_name == 'push' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifact
|
- name: Download artifact
|
||||||
@ -61,8 +61,8 @@ jobs:
|
|||||||
name: docs
|
name: docs
|
||||||
- name: Unpack artifact
|
- name: Unpack artifact
|
||||||
run: |
|
run: |
|
||||||
mkdir ./LATEST_DOCS_DIR
|
mkdir ./${{ env.LATEST_DOCS_DIR }}
|
||||||
tar -xzf ./docs.tar.gz -C ./LATEST_DOCS_DIR
|
tar -xzf ./docs.tar.gz -C ./${{ env.LATEST_DOCS_DIR }}
|
||||||
- name: Delete Artifact
|
- name: Delete Artifact
|
||||||
uses: geekyeggo/delete-artifact@v1
|
uses: geekyeggo/delete-artifact@v1
|
||||||
with:
|
with:
|
||||||
@ -87,11 +87,11 @@ jobs:
|
|||||||
rm -rf ${{ env.DOCS_DIR }}/.git
|
rm -rf ${{ env.DOCS_DIR }}/.git
|
||||||
rm -rf ${{ env.DOCS_DIR }}/en/${{ steps.get-destination-dir.outputs.dst_dir }}
|
rm -rf ${{ env.DOCS_DIR }}/en/${{ steps.get-destination-dir.outputs.dst_dir }}
|
||||||
mkdir -p ${{ env.DOCS_DIR }}/en/${{ steps.get-destination-dir.outputs.dst_dir }}
|
mkdir -p ${{ env.DOCS_DIR }}/en/${{ steps.get-destination-dir.outputs.dst_dir }}
|
||||||
cp -rf LATEST_DOCS_DIR/html/* ${{ env.DOCS_DIR }}/en/${{ steps.get-destination-dir.outputs.dst_dir }}
|
cp -rf ${{ env.LATEST_DOCS_DIR }}/html/* ${{ env.DOCS_DIR }}/en/${{ steps.get-destination-dir.outputs.dst_dir }}
|
||||||
if [[ ${{ env.RELEASE_BUILD }} == false ]]; then
|
if [[ ${{ env.RELEASE_BUILD }} == false ]]; then
|
||||||
rm -rf ${{ env.DOCS_DIR }}/page
|
rm -rf ${{ env.DOCS_DIR }}/page
|
||||||
mkdir -p ${{ env.DOCS_DIR }}/page
|
mkdir -p ${{ env.DOCS_DIR }}/page
|
||||||
cp -rf LATEST_DOCS_DIR/rtdpage/* ${{ env.DOCS_DIR }}/page
|
cp -rf ${{ env.LATEST_DOCS_DIR }}/rtdpage/* ${{ env.DOCS_DIR }}/page
|
||||||
fi
|
fi
|
||||||
- name: Validate Docs
|
- name: Validate Docs
|
||||||
run: |
|
run: |
|
||||||
|
Reference in New Issue
Block a user