This is an automated email from the ASF dual-hosted git repository.
jedcunningham pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-site.git
The following commit(s) were added to refs/heads/main by this push:
new 2d46686892 Free up disk space post building site by removing
docs-archive directory (#777)
2d46686892 is described below
commit 2d466868927b63de7fa29ad2dc6f2b73795639a4
Author: Pankaj Koti <[email protected]>
AuthorDate: Sat Apr 29 02:37:48 2023 +0530
Free up disk space post building site by removing docs-archive directory
(#777)
---
.github/scripts/print_df.sh | 32 ++++++++++++++++++++++++++++++++
.github/workflows/build.yml | 28 ++++++++++++++++++++++++----
2 files changed, 56 insertions(+), 4 deletions(-)
diff --git a/.github/scripts/print_df.sh b/.github/scripts/print_df.sh
new file mode 100755
index 0000000000..4b13f1fe1f
--- /dev/null
+++ b/.github/scripts/print_df.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+# Create an expandable group in the logs for the disk free (df -h) bash
command output using the syntax defined for
+# GiHub Action runners:
+#
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines.
+# With such expandable logs groupings we can avoid noisy outputs and at the
same time have pointers for
+# debugging/analysis.
+function group_df_logs {
+ echo "::group::df -h"
+ df -h
+ echo "::endgroup::"
+}
+
+group_df_logs
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 97a4b6c2ea..28dc85cd49 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -39,6 +39,8 @@ jobs:
with:
submodules: recursive
lfs: true
+ - name: Display disk free
+ run: ./.github/scripts/print_df.sh
- name: π Setup Python
uses: actions/setup-python@41b7212b1668f5de9d65e9c82aa777e6bbedb3a8 #
v2.1.4
with:
@@ -53,13 +55,23 @@ jobs:
hugo-version: '0.91.2'
extended: true
- name: π’ Install node dependencies
- run: ./site.sh install-node-deps
+ run: |
+ ./site.sh install-node-deps
+ ./.github/scripts/print_df.sh
- name: π Install Python dependencies
- run: pip install -r requirements.txt
+ run: |
+ pip install -r requirements.txt
+ ./.github/scripts/print_df.sh
- name: π Lint
uses:
apache/airflow-pre-commit-action@0764670bf370aab253130d534e1eda7ff497dc60 #
v2.0.0
- name: π§ Build site
- run: ./site.sh build-site
+ run: |
+ ./site.sh build-site
+ ./.github/scripts/print_df.sh
+ - run: |
+ rm -rf ./docs-archive/*
+ echo "docs-archive directory files are deleted as they are no longer
needed after the site is built in the above step"
+ ./.github/scripts/print_df.sh
- name: π
Optimize artifacts
if: ${{ github.event_name == 'pull_request' }}
run: |
@@ -67,6 +79,7 @@ jobs:
echo "These files have been deleted to optimize the size of the
artifacts." > ./dist/docs/index.html
echo "Here was the contents of the ./docs-archive directory" >>
./dist/docs/index.html
find ./dist/
+ ./.github/scripts/print_df.sh
- uses: actions/upload-artifact@726a6dcd0199f578459862705eed35cda05af50b
# v2.2.1
name: π Upload website as artifact
if: ${{ github.event_name == 'pull_request' }}
@@ -81,10 +94,12 @@ jobs:
# The asf.yaml file must be in the branch from which the files are
published.
# Otherwise, ASF publising tools cannot detect it.
cp .asf.yaml ./dist/
+ ./.github/scripts/print_df.sh
- name: πͺ Remove node and node modules
run: |
rm -rf node_modules
sudo rm -rf "$AGENT_TOOLSDIRECTORY/node"
+ ./.github/scripts/print_df.sh
- name: π Deploy website on asf-site branch
uses:
apache/airflow-JamesIves-github-pages-deploy-action@132898c54c57c7cc6b80eb3a89968de8fc283505
# v3.7.1
if: ${{ github.event_name == 'push' }}
@@ -94,12 +109,15 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLEAN: true # Automatically remove deleted files from the deploy
branch
- name: π§ Copy files from site to themeοΈ
- run: ./site.sh prepare-theme
+ run: |
+ ./site.sh prepare-theme
+ ./.github/scripts/print_df.sh
- name: π§ Prepare sphinx_airflow_theme package οΈ
working-directory: sphinx_airflow_theme
run: |
python3 -m pip install --user --upgrade setuptools wheel
python3 setup.py sdist bdist_wheel
+ ../.github/scripts/print_df.sh
- name: π Upload sphinx_airflow_theme package as artifact
uses: actions/upload-artifact@726a6dcd0199f578459862705eed35cda05af50b
# v2.2.1
with:
@@ -113,6 +131,7 @@ jobs:
pip install ./dist/sphinx_airflow_theme-*.whl
cd demo
./docs.sh build
+ ../../.github/scripts/print_df.sh
- name: π Upload sphinx_airflow_theme demo as artifact
uses: actions/upload-artifact@726a6dcd0199f578459862705eed35cda05af50b
# v2.2.1
with:
@@ -142,3 +161,4 @@ jobs:
--title "${TITLE}" \
--notes "${NOTES}" \
./dist/*
+ ../.github/scripts/print_df.sh