Skip to content

feat: automation with github action #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 7, 2021

Conversation

mattwang44
Copy link
Collaborator

@mattwang44 mattwang44 commented Sep 5, 2021

Purpose

This PR tend to automate several tasks with github action:

  • Pulling latest source strings from CPython daily and make the change as a PR (only support branch 3.9).
  • Launch build flow during a pull request is opened (supported base branch: 3.7, 3.8, & 3.9).
  • Deploy to github page if any change is pushed to main branch (current: 3.9).

Preview

These workflows are tested in my forked repo. One can check it out and learn how it works before merging this PR:

Caution

  • Need @adrianliaw's help to setup github page (configure branch as gh-pages and folder as root).
    image
  • To successfully deploy the site to github page, an empty file named .nojekyll is required to be committed to gh-pages branch after this PR is merged. It prevents github page from ignoring folders that start with underscores, which makes it failed to load css/js files (see this reference and this blog for details).

@josix josix self-requested a review September 5, 2021 07:36
@mattwang44 mattwang44 marked this pull request as ready for review September 5, 2021 10:30
Copy link
Collaborator

@josix josix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you @mattwang44

@adrianliaw adrianliaw merged commit e0d7814 into python:3.9 Sep 7, 2021
@@ -22,20 +22,20 @@ LC_MESSAGES := $(CPYTHON_CLONE)/Doc/locales/$(LANGUAGE)/LC_MESSAGES
VENV := ~/.venvs/python-docs-i18n/
PYTHON := $(shell which python3)
MODE := autobuild-dev-html
BRANCH = $(shell git describe --contains --all HEAD)
BRANCH := $(or $(VERSION), $(shell git describe --contains --all HEAD))
Copy link
Collaborator Author

@mattwang44 mattwang44 Oct 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this change, make commands would fail if run on branches other than 3.7, 3.8, 3.9 etc. It allows users to run Makefile commands on branches with customized name by inserting an argument named VERSION.

VERSION=3.9 make

@mattwang44 mattwang44 mentioned this pull request Oct 21, 2021
beccalzh pushed a commit to beccalzh/python-docs-zh-tw that referenced this pull request Sep 4, 2024
* Pulling latest source strings from CPython daily and make the change as a PR (only support branch 3.9).
  * Maintainer should resolve the fuzzy entries before merging it.
  * If the PR for this task is existed, changes will be forced-push to the existing branch (checkout peter-evans/create-pull-request@v3).
* Launch build flow during a pull request is opened (supported base branch: 3.7, 3.8, & 3.9).
* Deploy to github page if any change is pushed to main branch (current: 3.9).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants