You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2020/08/06 09:52:50 UTC

[airflow-site] branch master updated: Update docs for Github Action (#278)

This is an automated email from the ASF dual-hosted git repository.

kamilbregula pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow-site.git


The following commit(s) were added to refs/heads/master by this push:
     new ae5e98d  Update docs for Github Action (#278)
ae5e98d is described below

commit ae5e98d0038f41ca9221ccf6f8758fedfb7b8e2c
Author: Kamil BreguĊ‚a <mi...@users.noreply.github.com>
AuthorDate: Thu Aug 6 11:52:40 2020 +0200

    Update docs for Github Action (#278)
---
 CONTRIBUTE.md | 53 ++++++++++++++++++++++++++---------------------------
 1 file changed, 26 insertions(+), 27 deletions(-)

diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md
index 5a0d671..72389c6 100644
--- a/CONTRIBUTE.md
+++ b/CONTRIBUTE.md
@@ -313,6 +313,23 @@ and put the meetup's date in following format:
 
 If your meetup group isn't on the list, add it following the format of existing entries.
 
+### Preview changes on pull requests (CI/CD)
+
+1. Github Action has been configured to automatically publish artifacts for pull requests, so we can preview changes from Github Ui.
+  ![](https://docs.github.com/assets/images/help/repository/passing-data-between-jobs-in-a-workflow.png)
+
+2. After downloading the artifacts, unpack the archive and start the local HTTP server, run the following command.
+
+  Python 3
+  ```bash
+  python -m http.server --cgi 8000
+  ```
+  Python 2.7
+  ```bash
+  python -m SimpleHTTPServer 8000
+  ```
+
+
 # How to release new documentation
 
 Building documentation for the Apache Airlfow project also requires Python3.6 with pip and graphviz. You also need to have additional `apache/airflow` repository available.
@@ -399,9 +416,14 @@ To release a new documentation, follow these steps:
     cd "${AIRFLOW_SITE_REPO}" && git push origin "docs-for-${AIRFLOW_VERSION}"
     ```
 
-# Publish site on Apache server
+# Publish site on Apache server (CI/CD)
+
+Github Action has been configured to automatically publish artifacts for pull requests, so you can preview changes.
+
+# Publish site on Apache server (manual waay)
+
+It is recommended to use Github Action to publish changes to the website, but in case of problems it is also possible to publish changes to the website manually.
 
-In order to push changes to the WWW server you need to have the two copy of `apache/airflow-site` repository. The first contains `master` branch checkoued, the second - `asf-site`.
 
 ## Prerequisite tasks
 
@@ -413,7 +435,7 @@ AIRFLOW_SITE_REPO=$HOME/airflow-site
 AIRFLOW_SITE_ASF_SITE_REPO=$HOME/airflow-site-asf-site
 ```
 
-To clone repository run following commands:
+You need to have the two copy of `apache/airflow-site` repository. The first contains `master` branch checkoued, the second - `asf-site`. To clone repository run following commands:
 ```bash
 git clone git@github.com:apache/airflow-site.git "${AIRFLOW_SITE_REPO}"
 git clone git@github.com:apache/airflow-site.git "${AIRFLOW_SITE_ASF_SITE_REPO}"
@@ -516,30 +538,7 @@ cd "${AIRFLOW_SITE_REPO}" && git commit -m 'Docs for ${AIRFLOW_VERSION}'
 cd "${AIRFLOW_SITE_REPO}" && git push origin origin
 ```
 
-When it is accepted and merged, then run following commandss:
-
-```bash
-# Fetch changes
-cd "${AIRFLOW_SITE_REPO}" && git fetch
-cd "${AIRFLOW_SITE_REPO}" && git checkout master && git reset --hard origin/master
-
-# Build fresh landing pages and site
-cd "${AIRFLOW_SITE_REPO}" && bash site.sh build-landing-pages
-cd "${AIRFLOW_SITE_REPO}" && bash site.sh build-site
-
-# Remove all files from `asf-site` branch
-cd "${AIRFLOW_SITE_ASF_SITE_REPO}" && git ls-files | xargs -P 16 rm -rf
-
-# Copy files to asf-site branch
-cp -vr "${AIRFLOW_SITE_REPO}/dist/." "${AIRFLOW_SITE_ASF_SITE_REPO}/"
-
-# Create commit
-cd "${AIRFLOW_SITE_ASF_SITE_REPO}" && git add .
-cd "${AIRFLOW_SITE_ASF_SITE_REPO}" && git commit -m "Update - $(date)"
-
-# Push new website
-cd "${AIRFLOW_SITE_ASF_SITE_REPO}" && git push origin asf-site
-```
+Once it is accepted and merged, wait for Github Action build to publish the changes.
 
 # Additional tips: